2.x.lite + opengl 3.0?

skocznymroczny wrote on Sunday, July 26, 2009:

hello, i am developing a 3d engine with OpenGL 3.0. I am using 2.x.lite branch, which apparently supports opengl 3.0, unfortunately i am unable to control which version of opengl I want. This is how I create the window:

glfwInit();
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 0);
glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwOpenWindow( 800, 600, 8, 8, 8, 8, 16, 0, GLFW_WINDOW );

and GL_VERSION returns 3.1.0 instead of 3.0.0. Is it normal behaviour? Or is it going to be fixed soon? Thanks.

elmindreda wrote on Sunday, July 26, 2009:

The last I heard on the matter is what is written in the WGL_ARB_create_context spec, which states:

"If version 3.0 is requested, the context returned must implement exactly version 3.0."

Then, in the next paragraph, it says:

“(Versioning behavior once GL versions beyond 3.0 are defined will be defined by amending this specification to define dependencies on such GL versions. It’s possible that if version 3.N is requested and version 3.(N+1) is truly backwards-compatible, a 3.(N+1) context could be returned. But we need to specify exactly what “backwards-compatible” means given the combination of deprecated features and forward-compatible contexts.)”

So I really don’t know. I haven’t seen any updates since GL 3.1 came out, so it may be that this is the correct behaviour. In any case, GLFW itself cannot affect this, as we just pass along the version major and minor to the window system.

skocznymroczny wrote on Sunday, July 26, 2009:

actually, i don’t really mind opengl 3.1 instead of opengl 3.0, but i worry that without proper guidance ati cards will create 2.1 context. I’ll test it on radeon cards and update this post

skocznymroczny wrote on Sunday, July 26, 2009:

ok I did a test, above code creates a 2.1 opengl context on ATI cards. :confused:

elmindreda wrote on Sunday, July 26, 2009:

Oh dear, that’s not good. Thanks for looking into it. I’ll see if there’s anything GLFW is doing wrong.