Route WGL context code through gdi32.dll [resubmit]

Roderick Colenbrander thunderbird2k at gmx.net
Wed Sep 27 16:27:27 CDT 2006


I forgot to add the wgl symbol loading code to winex11.drv. This patch adds those.

Roderick

> Hi,
> 
> This is the first patch in a series of patches which will change the
> routing of wgl OpenGL calls.
> 
> Before my opengl32 rewrite all the wgl functions were inside opengl32.dll.
> I have moved (allmost) all wgl code over to winex11.drv. The old wgl code
> used ExtEscape hacks to access X datatypes. Because I just moved the code
> over to winex11.drv the current code still uses these hacks.
> 
> These hacks shouldn't be needed inside x11drv but getting rid of those
> takes some work. The X information which is needed by the wgl calls in stored
> in a 'PhysDev' structure which is basicly the driver equivalent of a 'hDC'.
> Right now the wgl functions receive a hDC but converting it to a PhysDev
> is done inside gdi32.dll. In order for wgl functions to get access to a
> physdev the functions need to be routed through gdi32 to winex11.drv
> 
> This patch routes wglCreateContext/wglMakeCurrent through gdi32.dll. For
> this I have added a new file opengl.c which does the routing. I have added
> the right prototypes to the code which loads functions from the display
> driver and I have changed the routing in opengl32's spec file.
> 
> Note that right now the following happens a few times for two of the WGL
> extension functions: opengl32 -> x11drv.foobar{ gdi32->foobar ->
> x11drv.foobar } So some code inside winex11.drv calls a GDI32 function to call another
> function inside winex11.drv. This is not nice but will be removed in a
> later step. Rewriting this function takes some more work and increases the
> size of the patch a lot. I plan to do this after most code has been moved.
> 
> 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_gdi_context2.patch
Type: text/x-diff
Size: 11383 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060927/a437bd83/wgl_gdi_context2.bin


More information about the wine-patches mailing list