PDA

View Full Version : NVIDIA drivers not returning the right profile mas



Alfonse Reinheart
06-24-2010, 02:52 AM
The current NVIDIA drivers seem to have an error with respect to glGetIntegerv(GL_CONTEXT_PROFILE_MASK), if you create contexts the old-fashioned way.

If you use the regular wglCreateContext function, WGL_CREATE_CONTEXT_ARB requires that, if you get a 3.2 or greater context, then the GL_CONTEXT_PROFILE_MASK will be set to GL_CONTEXT_COMPATIBILITY_PROFILE_BIT. This does not happen. If you create a context the old-fashioned way, this bitmask will be 0, even if you get a 3.2 or greater context.

The spec is very clear on this:



The default values for WGL_CONTEXT_MAJOR_VERSION_ARB and WGL_CONTEXT_MINOR_VERSION_ARB are 1 and 0 respectively. In this case, implementations will typically return the most recent version of OpenGL they support which is backwards compatible with OpenGL 1.0 (e.g. 3.0, 3.1 + GL_ARB_compatibility, or 3.2 compatibility profile)


If it returns a compatibility profile, then it must specify this by having the GL_CONTEXT_PROFILE_MASK have the proper bit set. And if it's a 3.2 or greater version of any kind, then having the GL_CONTEXT_PROFILE_MASK be zero is unacceptable.