Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Small NVIDIA wglCreateContextAttribsARB Bug?

Threaded View

  1. #1
    Intern Contributor
    Join Date
    Jul 2009
    Posts
    53

    NVIDIA bug wglCreateContextAttribsARB

    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.

    Code :
    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.

    Code :
    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
    Last edited by mark ds; 06-05-2012 at 05:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •