I want to know which version wglCreateContext() will return to me. Does it always return the highest version available? Do you have some official documentation links about that?
wglCreatContextAttribsARB (...) from the extension: WGL_ARB_create_context.    // Request an OpenGL 3.3 context
    const GLuint attribs [] = { WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
                                WGL_CONTEXT_MINOR_VERSION_ARB, 3,
                                0 };
    HGLRC hRC = wglCreateContextAttribsARB (hDC, 0, attribs);
Ironically, this means creating an OpenGL context, loading that extension, destroying the original context and creating a new one by calling wglCreateContextAttribsARB (...). See the extension spec. I listed for more details.
    wglCreateContext (hdc)
    wglCreateContextAttribsARB (hdc, 0, NULL)
Nope, it's not defined. You need to ask for a particular version if you want any guarantees.
You can typically expect a Compatibility profile, though, because of the need for the legacy support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With