The SolutionThe solution to this problem is *NOT* to bind your program to OpenGL32.lib. Instead you must manually load the correct driver - either 3dfxvgl.dll in the case of a Voodoo1 or Voodoo2 card or opengl32.dll in the case of everything else. The Details When I sat down to make this whole process work for my Azteroidz game, there were a few things that I wanted:
So I banged out some code, it seemed to work, and I released a new version of Azteroidz. Shortly thereafter the problem emails started trickling back, it seems I had overlooked something. That something was the fact that some GDI calls (SwapBuffers for example) themselves call WGL OpenGL functions internally. Therefore if you are using a OpenGL driver named opengl32.dll you must call the GDI functions, and if you are not using a driver named opengl32.dll you must NOT call the GDI functions. The Source code: OpenGL.h For the latest code, go here.
|
|||||||||||