Skip to main content
GameDev.net gamedev.net
🔒 Locked

OpenGL 3.2+ context for linux with glx

Started by themean Jan 31, 2012 at 6:20 PM 2 replies 1.6k views
Original Post
themean
themean
I follow this tutorial http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_%28GLX%29
but i'm not sure in his propriety
themean
themean
in the same topic
how i can check context version after his creation in linux (glx)
in windows i use
glGetIntegerv(GL_MAJOR_VERSION, &glVersion[0]); // Get back the OpenGL MAJOR version we are using
glGetIntegerv(GL_MINOR_VERSION, &glVersion[1]);
(glew)
but in glx this dont work
V-man
V-man
You have to create a GL context with glXCreateContextAttribsARB as the example shows.

If you want to make gl function calls, then you need to have a context current. Call them after the glXMakeCurrent call.
That is the way it is on all platforms (Windows, Apple, Mac and even on GL ES systems).
Nairou
Nairou
Or you could just use GLFW.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.