Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Setting openGL revision number and openGL defaults.

Using GLFW
  • JaegerBomb


    I am currently developing some software utilizing GLFW, and I have a quick question when it comes to setting the openGL version as a glfwWindowHint. I can easily set the GLFW_CONTEXT_VERSION_MAJOR and GLFW_CONTEXT_VERSION_MINOR, but I was searching the source code and there is no way (that I can see) to set the GLFW_CONTEXT_REVISION. Is this by design? Is there a reason you wouldn't want to specify the revision number of OpenGL (ie... 3.0.1)?

    Also, I was curious.. is there a way to allow GLFW to pick the latest openGL version? I see glfw defaults to 1.0, but it looks like the actual version returned (using GLEW) is 4.3.2.


    Last edit: JaegerBomb 2013-07-14
  • Camilla Löwy
    Camilla Löwy

    Yes, this is by design. You cannot request a specific revision on any platform. The OpenGL API version is fully identified by the major and minor version numbers. The revision numbers identify fixes to that version of the specification.

    There is no way to request "the latest version" on the platform level, except by leaving the major and minor version number attributes at their default values of 1.0, which is what GLFW does when the window hints have their default values of 1.0.