Route WGL context code through gdi32.dll

Roderick Colenbrander thunderbird2k at gmx.net
Tue Sep 26 16:06:42 CDT 2006


Ignore this patch for now. I forgot that it depends on a different patch which I sent before which removes some unneeded exports. I didn't take that patch into account (this was on a different system) When the other patch is in I'll create a correct new patch.

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

-- 
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-patches mailing list