OpenGL 4.6 but get GL3W_ERROR_OPENGL_VERSION
Closed this issue · 2 comments
OrKaraz commented
Hi,
In my project, when i init OpenGL with gl3wInit i have an error : GL3W_ERROR_OPENGL_VERSION
The code below (get from here) return strange value. I have put it in the parse_version function.
int major, minor;
glGetIntegerv(GL_MAJOR_VERSION, &major);
glGetIntegerv(GL_MINOR_VERSION, &minor);
printf("%d.%d\n", major, minor);
printf return : 0.1275
any solution ? Thanks for help
skaslev commented
Can you post a more complete code sample for how you create OpenGL context?
You probably have to request core profile context. In glut goes something along the lines of
glutInit(&argc, argv);
glutInitContextVersion(4, 6);
glutInitContextProfile(GLUT_CORE_PROFILE);
or
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
for glfw.
OrKaraz commented
Hi,
My bad, wrong copy/paste from example.
Thanks