You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an error related to shader program binding while using ImGui with LWJGL and OpenGL. The error message reads:
GL_INVALID_OPERATION error generated. No active program.
GL_INVALID_OPERATION error generated. Invalid VAO/VBO/pointer usage.
GL_INVALID_OPERATION error generated. Target buffer must be bound.
When running the application with ImGui rendering enabled, the OpenGL shaders seem to be unbound, and the program fails to render properly. The error does not occur when ImGui is disabled.
This code was pretty much taken from the GamesWithGabe lwjgl imgui tutorial linked in the main page. If I am just implementing this incorrectly, please let me know.
Initialize GLFW window and OpenGL context.
Initialize ImGui with LWJGL backend (ImGuiImplGlfw, ImGuiImplGl3).
Call imGuiGlfw.newFrame() and ImGui.newFrame() in the main render loop.
Render ImGui content using ImGui.render() and imGuiGl3.renderDrawData(ImGui.getDrawData()).
Observe the OpenGL errors related to unbound shader programs.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Please try the Application module to check if Dear ImGui does work on your system in general. This will help to understand if there is a problem on the binding side.
Version
1.87.6
What happened?
I'm encountering an error related to shader program binding while using ImGui with LWJGL and OpenGL. The error message reads:
GL_INVALID_OPERATION error generated. No active program.
GL_INVALID_OPERATION error generated. Invalid VAO/VBO/pointer usage.
GL_INVALID_OPERATION error generated. Target buffer must be bound.
When running the application with ImGui rendering enabled, the OpenGL shaders seem to be unbound, and the program fails to render properly. The error does not occur when ImGui is disabled.
This code was pretty much taken from the GamesWithGabe lwjgl imgui tutorial linked in the main page. If I am just implementing this incorrectly, please let me know.
Heres the code:
import imgui.ImFontConfig;
import imgui.ImGui;
import imgui.ImGuiIO;
import imgui.flag.ImGuiConfigFlags;
import imgui.gl3.ImGuiImplGl3;
import imgui.glfw.ImGuiImplGlfw;
import imgui.type.ImInt;
import org.lwjgl.Version;
import org.lwjgl.glfw.Callbacks;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.glfw.GLFWErrorCallback;
import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GL43;
import org.lwjgl.opengl.GLDebugMessageCallback;
import static org.lwjgl.glfw.GLFW.;
import static org.lwjgl.opengl.GL11.;
import static org.lwjgl.opengl.GL20C.glUseProgram;
import static org.lwjgl.opengl.GL30.glBindVertexArray;
import static org.lwjgl.system.MemoryUtil.NULL;
public class Window {
private final ImGuiImplGlfw imGuiGlfw = new ImGuiImplGlfw();
private final ImGuiImplGl3 imGuiGl3 = new ImGuiImplGl3();
}
hs_err_pid12376.log
Reproduction
Initialize GLFW window and OpenGL context.
Initialize ImGui with LWJGL backend (ImGuiImplGlfw, ImGuiImplGl3).
Call imGuiGlfw.newFrame() and ImGui.newFrame() in the main render loop.
Render ImGui content using ImGui.render() and imGuiGl3.renderDrawData(ImGui.getDrawData()).
Observe the OpenGL errors related to unbound shader programs.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: