Search code examples
windowswinapiopengl

wglGetProcAddress for OpenGL 1.1 functions


This wiki page on the OpenGL website claims that OpenGL 1.1 functions should NOT be loaded via wglGetProcAddress(), and the wording seems to imply that some systems will by design return NULL if you try:

http://www.opengl.org/wiki/Platform_specifics:_Windows#wglGetProcAddress

(The idea being that only 1.2+ functions deserve loading by way of wglGetProcAddress()).

The page does not tell us who reported these failed wglGetProcAddress() calls on 1.1 functions, which I've never personally seen. And google searches so next to no information on the issue either.

Would wglGetProcAddress() actually return NULL for 1.1 functions for enough users such that I should actually care? Or does it just fail for a select few unlucky users with really broken GPU drivers (in which case I don't much care).

Has anybody else come across this?


Solution

  • I technically answered this on the discussion page of that Wiki article, but:

    Would wglGetProcAddress() actually return NULL for 1.1 functions for enough users such that I should actually care?

    It will return NULL for all users. I have tried it on NVIDIA and ATI platforms (recent drivers and DX10 hardware), and all of them do it.