mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-18 16:01:44 +00:00
Backends: OpenGL3: call glGetString(GL_VERSION) even in GS ES 2.0 path. (#8197)
Apparently as per specs works. I reckon the best way to confirm it is to try.
This commit is contained in:
@@ -297,15 +297,13 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
|
|||||||
io.BackendRendererName = "imgui_impl_opengl3";
|
io.BackendRendererName = "imgui_impl_opengl3";
|
||||||
|
|
||||||
// Query for GL version (e.g. 320 for GL 3.2)
|
// Query for GL version (e.g. 320 for GL 3.2)
|
||||||
|
const char* gl_version_str = (const char*)glGetString(GL_VERSION);
|
||||||
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
||||||
// GLES 2
|
// GLES 2
|
||||||
const char* gl_version_str = "";
|
|
||||||
IM_UNUSED(gl_version_str); // For IMGUI_IMPL_OPENGL_DEBUG block below.
|
|
||||||
bd->GlVersion = 200;
|
bd->GlVersion = 200;
|
||||||
bd->GlProfileIsES2 = true;
|
bd->GlProfileIsES2 = true;
|
||||||
#else
|
#else
|
||||||
// Desktop or GLES 3
|
// Desktop or GLES 3
|
||||||
const char* gl_version_str = (const char*)glGetString(GL_VERSION);
|
|
||||||
GLint major = 0;
|
GLint major = 0;
|
||||||
GLint minor = 0;
|
GLint minor = 0;
|
||||||
glGetIntegerv(GL_MAJOR_VERSION, &major);
|
glGetIntegerv(GL_MAJOR_VERSION, &major);
|
||||||
|
Reference in New Issue
Block a user