WGL: add extension checking

Roderick Colenbrander thunderbird2k at gmx.net
Sat Oct 28 10:13:18 CDT 2006


Hi,

This is an updated version of the previous patch. I forgot to attach the changes to the make_opengl script which created the opengl_ext / opengl_norm source code.

Regards,
Roderick Colenbrander


> Hi,
> 
> This is a part of a patch which I sent before which rewrote our
> wglGetProcAddress code and extension loading code. This patch only contains the new
> extension loading code.
> 
> Before all OpenGL extensions were loaded using glXGetProcAddress. The
> returned function pointers were stored in a table. The function
> wglGetProcAddress then returned a wrapper extension function which called the stored
> function pointer.
> 
> The issue is that glXGetProcAddress isn't guaranteed to return NULL when
> an extension isn't found. This patch makes our extension loading code more
> reliable by checking whether the extension required by the function is
> really available before calling the display driver to look up a function.
> 
> This change required some small changes to the make_opengl32 script which
> generates all opengl wrapping code. The table with GL extensions has been
> extended with an extension name field and WGL extensions have been added to
> it aswell. Before there was a 'glx_name' field aswell which was used for an
> Nvidia specific GL extension which added the WGL functions
> wglAllocateMemoryNV / wglFreeMemoryNV. These functions will soon be handled added to
> winex11.drv as extensions, we won't directly look up the GLX functions from
> opengl32.dll anymore.
> 
> 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_extensions2.patch.gz
Type: application/x-gzip
Size: 27538 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061028/9bb32c60/wgl_extensions2.patch-0001.bin


More information about the wine-patches mailing list