WGL: add extension checking
thunderbird2k at gmx.net
Sun Oct 29 10:51:49 CST 2006
Today I talked to Stefan and he was worried that adding the WGL extensions to opengl_ext.c would cause unneeded overhead. Though WGL extensions aren't called very frequently.
Second the 'glXGetProcAddress' protection isn't needed for WGL extensions as I'm already doing something similar for it in winex11.drv already. I will post an updated version of this patch without the WGL extension in opengl_ext.c soon.
Note that my other WGL patch (the one which adjust wglMakeContextCurrentARB) should apply fine, it doesn't depend on this patch.
> 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.
> 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
> > reliable by checking whether the extension required by the function is
> > really available before calling the display driver to look up a
> > This change required some small changes to the make_opengl32 script
> > generates all opengl wrapping code. The table with GL extensions has
> > extended with an extension name field and WGL extensions have been added
> > it aswell. Before there was a 'glx_name' field aswell which was used for
> > 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
> > 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
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the wine-devel