X11Drv: move WGL extension code

Roderick Colenbrander thunderbird2k at gmx.net
Sun Sep 3 07:07:21 CDT 2006


Here's again an updated version of the patch. I have done some more testing and I hope it compiles correctly on all systems this time. All those different OpenGL libraries, headers, you really get sick of them after a while.

The patch just fixes some minor build issues. I'll also resubmit the next patch as I modified that one aswell.

Roderick

> This is an updated version of the patch. As noticed by Mike and Chris the
> prototype of glXGetProcAddressARB isn't available on all systems. Further
> this patch improves the detection of pbuffers which causes a regression on
> the dri drivers.
> 
> As you can see in opengl32's Makefile.in and in wgl.c the files wgl_ext.h
> and wgl_ext.c aren't used anymore. Further some code isn't used anymore
> aswell. This dead stuff is removed in the patch '	OpenGL32 remove unused code'
> which still applies but depends on this patch.
> 
> Regards,
> Roderick
> 
> > Hi,
> > 
> > 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 ;)
> > 
> > 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
> 
> -- 
> 
> 
> "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-- 


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: 15283 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060903/54604949/x11drv_wgl4.patch.bin


More information about the wine-patches mailing list