nVidia OpenGL 3.2 drivers

Fellow OpenGL users,

I am trying to use the new nVidia 3.2 drivers and simply cannot make them work the moment I specify :

const int attribs[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
WGL_CONTEXT_MINOR_VERSION_ARB, 2, 0, 0 };

The device is created properly, can be selected, etc… however even the most basic functions like :

glPixelStorei( GL_PACK_ALIGNMENT, 1 );

fail, causing glGetError() to return GL_INVALID_ENUM. The moment I specify the minor version as “1” then things work just as expected.

Any ideas or help would be appreciated.

Andrew

My guess is that it was depreciated in 3.0 or 3.1 and removed in 3.2. Can’t verify that since I cannot find a list of depreciated functions anywhere…

MarkS:
http://www.khronos.org/files/opengl-quick-reference-card.pdf Shows all of the removed functions in blue.
glPixelStore has NOT been depreciated or removed.

Andrew Cross:
A 3.2 context requires an additional attribute to specify the profile.
Either:
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
or
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,

WGL_CONTEXT_PROFILE_MASK_ARB is not required, because according to spec, default value is WGL_CONTEXT_CORE_PROFILE_BIT_ARB. That means GL 3.2 should create a Core profile if this flag is not set.

There is some other problem. I’ve tried to create context as Andrew Cross created and it works. Even a glPixelStorei( GL_PACK_ALIGNMENT, 1 ); does not generate an error.

 	int attribs[] =
    {
        WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
        WGL_CONTEXT_MINOR_VERSION_ARB, 2,
	0
    };

    m_hrc = wglCreateContextAttribsARB(pDC->m_hDC,0, attribs);

You are absolutely correct, I do seem to be able to create the device and execute basic functions however I seem to get glError’s the moment I make almost any other call. I am going to assume that this is something in our library code somewhere although I was unaware that any functionality had been depreciated between 3.1 and 3.2.

Andrew

I forgot to thank you very much for your help on this issue. I really do appreciate you taking the time to look into other people’s potentially stupid problems :slight_smile:

I have tracked down this issue a bit and wanted to see if anyone else sees this. If you create a 3.2 device and simple execute this call :

/* Create 3.2 device here … */

glEnableClientState( GL_VERTEX_ARRAY );
assert( glGetError() == GL_NO_ERROR );

glEnableClientState is not valid in a 3.2 core profile.
You must specify the compatability profile if you want to use this function, or any other function that is shown in blue on the Quick Reference Card.

const int attribs[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
WGL_CONTEXT_MINOR_VERSION_ARB, 2,
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, 0, 0 };