WGL: fix wglGetProcAddress bug

Roderick Colenbrander thunderbird2k at gmx.net
Wed Dec 27 18:26:26 CST 2006


Hi,

This patch fixes a nasty wglGetProcAddress bug. In case the name of an unknown GL extension (one which is not in wine yet) was passed to wglGetProcAddress it was assumed that it was a WGL extension.

WGL extensions are in the end looked up in winex11.drv. The wglGetProcAddress function in winex11.drv can return WGL extensions but it can also return native GL functions. This ability is used in order to fill the opengl32 thunks (win32 GL -> native GL).

The problem was that unknown extensions were also passed to the winex11.drv code. This resulted that code to look up a native GL functions (the winex11.drv code returns wgl extensions if the function name starts with 'wgl' and else it calls glXGetProcAddress).

In the end this patch makes sure that only functions which start with a 'w' are passed to the winex11.drv code in the other cases a warning is printed that the function wasn't found.

Regards,
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: wgl_ext.patch
Type: text/x-patch
Size: 1563 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061228/9a8a7bdc/wgl_ext.bin


More information about the wine-patches mailing list