Recently I've been doing research on how OpenGL graphics drivers (ICD) implement OpenGL functions called by OpenGL runtime (opengl32.dll) on Windows.
I understand that I can use the GetProcAddress
to get the function pointers of OpenGL 1.0 and 1.1 functions exposed by opengl32.dll
, and I have to call wglGetProcAddress
returned by GetProcAddress
to get the context-dependent function pointers for OpenGL 1.2+ functions.
To see whether ICD executes the OpenGL functions, I wrote wrapper programs of opengl32.dll and ICD and let them print the function name when the function gets called. For OpenGL 1.2+ functions, I saw my test program first called the function pointer returned by wglGetProcAddress
from opengl32.dll, then I saw it called the function pointer returned by DrvGetProcAddress
from ICD (I wrote hook functions for some of these functions). So it proved that these functions were implemented by the graphics driver. But for OpenGL 1.0 and 1.1 functions, who have API symbols exposed by opengl32.dll, both wglGetProcAddress
of opengl32.dll and DrvGetProcAddress
of ICD return NULL when they attempt to load them by their function names.
I also understand that both GetProcAddress functions were used to get the function pointers of OpenGL extension (OpenGL 1.2 or above) functions only, but I'm not sure whether the graphic driver implements OpenGL 1.0 and 1.1 functions now. If it does, how do these functions in ICD get called by opengl32.dll?