Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGui_ImplOpenGL3_RenderDrawData() GL state #6267

Closed
BrunoLevy opened this issue Mar 22, 2023 · 1 comment
Closed

ImGui_ImplOpenGL3_RenderDrawData() GL state #6267

BrunoLevy opened this issue Mar 22, 2023 · 1 comment

Comments

@BrunoLevy
Copy link

Version/Branch of Dear ImGui:

Version: 1.89.4

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_opengl3.cpp

My Issue/Question:

If there was no previously bound GL program, ImGui_ImplOpenGL3_RenderDrawData() exits with a bound program.
This is due to the fix for #6220). In imgui_impl_opengl3.cpp, line 593:

if (glIsProgram(last_program)) glUseProgram(last_program);

maybe should be replaced with:

if (last_program == 0 || glIsProgram(last_program)) glUseProgram(last_program);
@ocornut
Copy link
Owner

ocornut commented Mar 23, 2023

Pushed fix as 7dcf129, thank you!

@ocornut ocornut closed this as completed Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants