PDA

View Full Version : {wgl|glX}GetProcAddress() and core functions



Julien Cayzac
03-05-2002, 06:43 AM
It seems that glXGetProcAddress() is capable of returning core OpenGL functions addresses (I tested it getting glBegin's address).
I've always thought it was only for extensions functions...
Is that standard ? Do wglGetProcAddress() also works for core GL ?

Thanks,
Julien.

Bob
03-05-2002, 10:18 AM
How else would you use the functions from OpenGL 1.2 and above under Windows?

zeckensack
03-05-2002, 11:31 AM
Quake3 wouldn't run without this either. Hmmm ... runtime linking ...

Julien Cayzac
03-05-2002, 11:19 PM
Originally posted by Bob:
How else would you use the functions from OpenGL 1.2 and above under Windows?

By using the Win32 API, not the WGL one.

Julien.

Shag
03-05-2002, 11:44 PM
I can't speak about ATI, but certainly the nvidia drivers don't expose any opengl functions as exports.

Bob
03-06-2002, 01:59 AM
By using the Win32 API, not the WGL one.


Do you refer to GetProcAddress?

The WGL one is specifically designed to return pointers to GL functions. The Win32 one only returns functions that are exposed as exports. As Shag said, NVIDIA does not expose their functions as export, so you shouldn't be able to load any functions directly from their driver with GetProcAddress.

I believe you can load functions from opengl32.dll, cause they are exports. But that doesn't help you if you want to load any extension or OpenGL 1.2+ function, cause there are no such functions in opengl32.dll.