[wined3d] Converting Wined3d to use WGL instead of GLX

Joris Huizer jorishuizer at planet.nl
Sat Dec 17 04:50:34 CST 2005

Aric Cyr wrote:

> Now everything works fine, except this brings up another issue with
> wglGetProcAddress.  The problem is that all gl extensions function pointers are
> declared WINAPI, and indeed this is what type of functoin wglGetProcAddress is
> expected to return.  However for extensions that are not registered in
> opengl_ext.c wglGetProcAddress falls back to glXGetProcAddressARB which would
> return a non-WINAPI function pointer.  After the first call to such a function
> we would have corrupted the stack.  There doesn't seem to be a nice way to fix
> this that I can think of.  wglGetProcAddress should never return a non-WINAPI
> function though, as that is just asking for trouble.  Better to return NULL
> instead of falling back to glXGetProcAddressARB.

Maybe it'd be possible to make a wrapper function -- a WINAPI function 
pointer that just does a call to this glXGetProcAddressARB ?
(Just me thinking aloud ;-) )

More information about the wine-devel mailing list