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

Backends: OpenGL3: Add compatibility of GL_VERSION for GL 2.x #3530

Closed
wants to merge 1 commit into from

Conversation

xndcn
Copy link
Contributor

@xndcn xndcn commented Oct 15, 2020

If we use imgui_impl_opengl3 as backend in desktop GL 2.x, the g_GlVersion may be initialized with weird numbers and maybe pass the checking like (g_GlVersion >= 330)

GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above. So we have to parse GL_VERSION under GL 2.x

reference: https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries

GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x
ocornut pushed a commit that referenced this pull request Oct 15, 2020
GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x
@ocornut
Copy link
Owner

ocornut commented Oct 15, 2020

Merged with minor changes (using sscanf since it's already used in this file). Thank you !

@ocornut ocornut closed this Oct 15, 2020
@grauw
Copy link

grauw commented Feb 9, 2023

Issue reintroduced in 459de65.

grauw added a commit to grauw/imgui that referenced this pull request Feb 9, 2023
GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x

Regressed since 459de65
See ocornut#3530
grauw added a commit to grauw/gl3w_stripped that referenced this pull request Feb 9, 2023
GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x

Reference https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries
See ocornut/imgui#3530
grauw added a commit to grauw/imgui that referenced this pull request Feb 9, 2023
…t#6154)

GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x

Reference https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries
Regressed since 459de65
See ocornut#3530
ocornut pushed a commit that referenced this pull request Feb 14, 2023
…2.x (#6154, #4445, #3530)

GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x
Reference https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries
Regressed since 459de65
See #3530
ocornut added a commit that referenced this pull request Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants