imgui: glGetError on CORE profile glfw
Version/Branch of Dear ImGui:
Version: 1.70WIP Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: the sample: example_glfw_opengl3
Operating System: Windows7
My Issue/Question:
When setting in this example
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
and checking glGetError as
glfwMakeContextCurrent(window);
int err = glGetError();
if(err!=GL_NO_ERROR)
printf("glError %d\n",err);
glfwSwapBuffers(window);
example is running whitout any visual difference but glGetError is reporting 1280 It does not happen with COMPAT profile.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (11 by maintainers)
According to 😕/www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPolygonMode.xhtml GL_POLYGON_MODE can be used for glGet.
So this is not an imgui issue but a Radeon driver issue (which they havent updated since 2016)
I just use glGetError after the imgui functions ended to clear the error flag as a temporary solution.
This is checking if another of the standard header has already been included. This is suggesting that any OpenGL version from 1.1 has
GL_POLYGON_MODEalready, but the loader doesn’t really bother with deprecations unfortunately.Only could found this https://community.amd.com/thread/169728 And I tried to get last driver other times for another problem without succes 😦
I didnt mean that but that I inserted some code after that in example https://github.com/ocornut/imgui/blob/master/examples/example_glfw_opengl3/main.cpp#L181
If you search the issue you will get several references to opengl3 implementation
I did glGetError in several places: no error before and an error after this line
In https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGet.xhtml you will not find this constant It gets defined in https://github.com/ocornut/imgui/blob/master/examples/libs/gl3w/GL/glcorearb.h#L161 because
#ifndef GL_VERSION_1_1but I dont know how this GL_VERSION_1_1 should workI still dont understand if you dont accept GL version modifications in the examples. But could find where the first 1280 error is caused https://github.com/ocornut/imgui/blob/master/examples/imgui_impl_opengl3.cpp#L177