I'm really starting to be tired by this extension. I have tons of problems with it.
What i want to do is to list the pixel formats available on my system, and let the user select one of them. For that, following the spec, i'm creating a temp window to initialize the extensions, then list the formats by calling wglGetPixelFormatAttribivARB with the DC of my temp window and the unique attribute WGL_NUMBER_PIXEL_FORMATS_ARB.
On an ATI Rage 128 and ATI Radeon 8500, the call to that function fails. According to the spec, i should be able to call GetLastError() to know exactly what the error is, but what i get is a "operation completed successfully"! Grrrr. I'm 100% sure my code is correct; the only thing unusual i do is to create the main window with that extension (while generally it's only used to create PBuffers). Latest drivers installed.
It's a little better with NVidia's cards: it works on GeForces, but the drivers do not seem to follow the spec at 100%. According to the spec, WGL_COLOR_BITS_ARB should return the size of the color buffer EXCLUDING the alpha bitplanes. But it returns 32 instead of 24 with the latest drivers. There is the same problem with the ZBuffer/stencil buffer. It's not a big problem, but i hate to add dirty hacks to my code just to fix that.