mark ds
06-05-2012, 04:52 AM
Hi
Easy enough to work around, but I thought I'd report it...
wglCreateContextAttribsARB always fails to create a 3.1/3.0/2.1 context when I include WGL_CONTEXT_PROFILE_MASK_ARB, irrespective of whether I use WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB or WGL_CONTEXT_CORE_PROFILE_BIT_ARB.
int attributes[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, majorVersion,
WGL_CONTEXT_MINOR_VERSION_ARB, minorVersion,
WGL_CONTEXT_PROFILE_MASK_ARB, coreProfile ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
0
};
The spec states:
The attribute name WGL_CONTEXT_PROFILE_MASK_ARB requests an OpenGL context supporting a specific <profile> of the API. If the WGL_CONTEXT_CORE_PROFILE_BIT_ARB bit is set in the attribute value, then a context implementing the <core> profile of OpenGL is returned. If the WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB bit is set, then a context implementing the <compatibility> profile is returned. If the requested OpenGL version is less than 3.2, WGL_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality of the context is determined solely by the requested version.
Obviously it isn't being ignored but causes context creation to fail. It works fine if I comment out WGL_CONTEXT_PROFILE_MASK_ARB.
int attributes[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, majorVersion,
WGL_CONTEXT_MINOR_VERSION_ARB, minorVersion,
//WGL_CONTEXT_PROFILE_MASK_ARB, coreProfile ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
0
};
This behaviour is true for the last two release drivers.
Regards
Easy enough to work around, but I thought I'd report it...
wglCreateContextAttribsARB always fails to create a 3.1/3.0/2.1 context when I include WGL_CONTEXT_PROFILE_MASK_ARB, irrespective of whether I use WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB or WGL_CONTEXT_CORE_PROFILE_BIT_ARB.
int attributes[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, majorVersion,
WGL_CONTEXT_MINOR_VERSION_ARB, minorVersion,
WGL_CONTEXT_PROFILE_MASK_ARB, coreProfile ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
0
};
The spec states:
The attribute name WGL_CONTEXT_PROFILE_MASK_ARB requests an OpenGL context supporting a specific <profile> of the API. If the WGL_CONTEXT_CORE_PROFILE_BIT_ARB bit is set in the attribute value, then a context implementing the <core> profile of OpenGL is returned. If the WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB bit is set, then a context implementing the <compatibility> profile is returned. If the requested OpenGL version is less than 3.2, WGL_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality of the context is determined solely by the requested version.
Obviously it isn't being ignored but causes context creation to fail. It works fine if I comment out WGL_CONTEXT_PROFILE_MASK_ARB.
int attributes[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, majorVersion,
WGL_CONTEXT_MINOR_VERSION_ARB, minorVersion,
//WGL_CONTEXT_PROFILE_MASK_ARB, coreProfile ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
0
};
This behaviour is true for the last two release drivers.
Regards