[Scummvm-git-logs] scummvm master -> 2aa2ec4454b6d702d97ae07899fa16cbbbc1873e
scemino
noreply at scummvm.org
Fri Apr 11 15:07:30 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2aa2ec4454 BACKENDS: IMGUI: Fix imgui setup for opengl SDL 3D
Commit: 2aa2ec4454b6d702d97ae07899fa16cbbbc1873e
https://github.com/scummvm/scummvm/commit/2aa2ec4454b6d702d97ae07899fa16cbbbc1873e
Author: scemino (scemino74 at gmail.com)
Date: 2025-04-11T17:07:08+02:00
Commit Message:
BACKENDS: IMGUI: Fix imgui setup for opengl SDL 3D
Changed paths:
backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index c785f7162c2..ca18e7e7b55 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -589,11 +589,6 @@ bool OpenGLSdlGraphics3dManager::createOrUpdateGLContext(uint gameWidth, uint ga
_glContext = SDL_GL_CreateContext(_window->getSDLWindow());
if (_glContext) {
clear = true;
-
-#ifdef USE_IMGUI
- // Setup Dear ImGui
- initImGui(nullptr, _glContext);
-#endif
}
}
@@ -633,6 +628,14 @@ bool OpenGLSdlGraphics3dManager::createOrUpdateGLContext(uint gameWidth, uint ga
initializeOpenGLContext();
+#ifdef USE_IMGUI
+ if (clear && _glContext) {
+ // Setup Dear ImGui
+ initImGui(nullptr, _glContext);
+ }
+#endif
+
+
if (clear)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
More information about the Scummvm-git-logs
mailing list