ARGH, can't create a non 4.2 context on AMD driver

This seems a bit backwards to the problem most people have, but I’ve tried everything I can think of and no luck.

The code gives me a 2.1 context on MAC OSX, as well as on a PC with an NVIDIA card. Once I swapped to an AMD Radeon 7970 yesterday I am always given a 4.2 context and now all of a sudden my code is fairly broken (for example, GL_ALPHA_TEST no longer works).

To create the context I do:

int attribs[] = {
wglCreateContextAttribsARB( window->Window.Device,0, attribs);

OR try without using any extensions…

wglCreateContext( window->Window.Device );

Either way I get the same results, which I I verify later using:

char *GLver = (char*)glGetString(GL_VERSION);

Which always returns:
“4.2.11331 Compatibility Profile Context”

Seems unlikely this a driver bug since it’d break most every GL app from before 2008. What am I doing wrong?

You’re only guaranteed to get an OpenGL version that is compatible with the one you’re requesting. As it’s giving you the 4.2 Compatibility profile, not the 4.2 Core profile, this is acceptable as 2.1 is covered by the 4.2 Compatibility profile. OSX is a little different because it has two OpenGL implementations - GL 2.1 and GL 3.2.

The fact that GL_ALPHA_TEST and other things are broken are separate issues. They should still be working in the 4.2 Compatibility context, so you may want to take that up with AMD if you’re fairly certain there is a bug.

Note that AMD sticks very close to the GL spec, whereas Nvidia is a little looser and allows some things that should fail. Code that works with Nvidia GL implementations often requires a bit of tweaking because of this, but it isn’t AMD’s fault.

Ah ok, I understand now how a 4.2 Caompatibility context is fine.

shader2DProj in shader code (even with #version 120 at the top) and GL_ALPHA_TEST remain busted. Some display lists do work as well as other deprecated functionality (glBegin/End), so its not totally broken.

This bug aside, the current state of OpenGL on PCs overall seems like its in a poor state at the moment. Deprecated functionality, compatibility profiles, essential functionality via extensions is sometimes spotty, driver manufacturers not sticking to the standards, etc. Life in DirectX and on consoles seems very organized compared to this.