1

Today I finally found out what has been stalling my development process: Even though no errorcode is set, the function wglChoosePixelFormatARB returns 0 pixelformats. I am trying to set up an OpenGL context in my C++ application and I have managed to retrieve the function pointers for the extensions.

glGetIntegerv(GL_MAJOR_VERSION, &maj)

returns 4 so, naturally, I assumed it would be possible to create an OpenGL 3.2 context. However, after finding out there were no matches, I started to comment out some of my requirements to go in the attribList parameter. There were no matches whatsoever. Only when I, just to be certain, commented out

WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 2,

I finally got matches. Out of the 8 matching pixel formats that the other requirements meet, not ONE of them seems to support version 3 of OGL.

Has anyone ever run into this? I have tried updating/reinstalling my video drivers, but nothing has changed. I am running this on Windows 7, MS Visual Studio 2008, and my graphics card is one from the AMD Radeon HD 7700 Series.

4

1 回答 1

3

WGL_CONTEXT_MAJOR_VERSION_ARBWGL_CONTEXT_MINOR_VERSION_ARB相关属性不是Windows Pixelformat 的属性。您不得将它们与wglChoosePixelFormatARB().

这些选项属于扩展wglCreateContextAttribsARB定义的属性列表WGL_ARB_create_context

于 2013-11-12T19:22:08.940 回答