WGL: move wglGetCurrentDC

Roderick Colenbrander thunderbird2k at gmx.net
Sat Oct 14 15:11:33 CDT 2006


Hi,

This patch moves wglGetCurrentDC to gdi32.dll. The original wglGetCurrentDC code retrieved the current GLX context, looked up the corresponding HGLRC and extracted the HDC from that. The new code directly gets it from the HGLRC (by casting it to a OPENGL_Context).

Inside winex11.drv a HGLRC is casted to a Wine_GLContext which contains. The datatype contains a HDC as its first attribute followed by a number of X specific attributes. Inside gdi32.dll the HGLRC I casted it to a OPENGL_Context which only contains this first attribute. This workaround is used in this patch and the next couple of patches in order to move all WGL functions and WGL extensions over to gdi32/winex11.drv. When the transition is done, I will add a PhysRC datatype.

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_dc.patch
Type: text/x-patch
Size: 5385 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061014/e0c748e0/wgl_dc.bin


More information about the wine-patches mailing list