1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-23 23:31:08 +01:00

Backends: OpenGL3: Properly restoring "no shader program bound". (#6267, #6220, #6224)

This commit is contained in:
ocornut 2023-03-23 13:27:29 +01:00
parent 821814b450
commit 7dcf129b3b
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,7 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2023-03-23: OpenGL: Properly restoring "no shader program bound" if it was the case prior to running the rendering function. (#6267, #6220, #6224)
// 2023-03-15: OpenGL: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
// 2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224)
// 2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes).
@ -579,7 +580,7 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data)
// Restore modified GL state
// This "glIsProgram()" check is required because if the program is "pending deletion" at the time of binding backup, it will have been deleted by now and will cause an OpenGL error. See #6220.
if (glIsProgram(last_program)) glUseProgram(last_program);
if (last_program == 0 || glIsProgram(last_program)) glUseProgram(last_program);
glBindTexture(GL_TEXTURE_2D, last_texture);
#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER
if (bd->GlVersion >= 330)

View File

@ -57,6 +57,8 @@ Other changes:
- IO: Fixed support for calling io.AddXXXX functions fron inactive context (wrongly
advertised as supported in 1.89.4). (#6199, #6256, #5856) [@cfillion]
- Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
- Backends: OpenGL3: Properly restoring "no shader program bound" if it was the case prior to
running the rendering function. (#6267, #6220, #6224) [@BrunoLevy]
- Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
- Examples: Windows: Added 'misc/debuggers/imgui.natstepfilter' file to all Visual Studio projects,
now that VS 2022 17.6 Preview 2 support adding Debug Step Filter spec files into projects.