X11Drv: move WGL extension code

Roderick Colenbrander thunderbird2k at gmx.net
Fri Sep 1 06:57:24 CDT 2006


First of all sorry for the size of the patch but it can't be made that much smaller. I could perhaps save lets say 200 lines but that's not enough to make it 'small'.

This patch moves all WGL extension code over to x11drv. Standard OpenGL functions are exported by opengl32 itself or can be loaded using wglGetProcAddress. WGL extensions can only be loaded using this function. The WGL extension loading part of this function has been moved over to x11drv and all WGL extension had to be moved along. The wgl extension code itself is the same as the original code in wgl_ext.c except for small changes in things like ENTER_GL.

The way WGL extensions are loaded is different. The old code correctly advertised the names of available WGL extensions but the wglGetProcAddress code didn't work correctly. Even if an extension wasn't advertised you could get a function pointer to the functions. On Windows wglGetProcAddress would return NULL.

The patch adds new WGL extension loading code based on code written by an old opengl32 -> x11drv patch written by Tomas Carnacky. The code properly advertises WGL extensions and only returns function pointers when the extension is really available.

Further the patch depends on all the other WGL patches I sent.

I have tested the code using various OpenGL programs including the now famous World of Warcraft and everything works fine ;)

Roderick Colenbrander

Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x11drv_wgl4.patch.gz
Type: application/x-gzip
Size: 15249 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060901/ce299110/x11drv_wgl4.patch-0001.bin

More information about the wine-patches mailing list