gdi: create driver interface for opengl implementation and add wrapper functions.

Tomas Carnecky tom at dbservice.com
Fri May 12 14:57:15 CDT 2006


This patch adds an WineGL interface to the GDI driver and creates
wrapper functions for them. If the wgl function takes a HDC, the wrapper
extract the PHYSDEV and prepends it to the driver-function argument
list. This way we have direct access to the PHYSDEV in x11drv and don't
need to use ExtEscape(). For function that don't have a HDC as an
argument I use the graphics_driver structure to get the driver function
table.

The next patches will include:
 - winex11.drv.spec patch to add WineGL_wgl?? stubs
 - WineGL initialization in x11drv (load libGL, get function pointers etc.)
 - x11drv WineGL_wgl?? implementation, I'd say one function at a time to
keep the patches as small as possible (the code will mostly be
unchanged, just copied from dlls/opengl/*, with some cleanup)
 - and once the code is found to be clean one last patch for opengl32
that removes wgl_ext.[c|h] and makes wgl??() functions call
WineGLWrapper_wgl??()

Some questions I have:
 - I'd like to move the WineGL files into their own subdirectory, is
that ok? If yes, how should that be handled? I simply added
'winegl/init.c' to C_SRCS and it works fine as I couldn't get the
makefile working, what should I do?
 - Is it possible to change source files at configure-time? Let's say I
want to compile different sources when the user has and hasn't opengl
installed, or are #ifdef's in the code the preferred solution?


tom


-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-WineGL-gdi-wrapper.patch
Type: text/x-patch
Size: 10552 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060512/1f3ead9e/wine-WineGL-gdi-wrapper.patch


More information about the wine-patches mailing list