Roderick Colenbrander : wgl: Move wglShareLists to gdi32.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 16 05:28:57 CDT 2006
Module: wine
Branch: master
Commit: 92e6e46ca95f7c20bd04864d35d9604bf8e26fd1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=92e6e46ca95f7c20bd04864d35d9604bf8e26fd1
Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date: Sat Oct 14 22:49:09 2006 +0200
wgl: Move wglShareLists to gdi32.
---
dlls/gdi/driver.c | 1 +
dlls/gdi/gdi_private.h | 1 +
dlls/gdi/opengl.c | 24 ++++++++++++++++++++++++
dlls/opengl32/opengl32.spec | 2 +-
dlls/opengl32/wgl.c | 10 ----------
5 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/dlls/gdi/driver.c b/dlls/gdi/driver.c
index db2086c..f5900e2 100644
--- a/dlls/gdi/driver.c
+++ b/dlls/gdi/driver.c
@@ -198,6 +198,7 @@ #define GET_FUNC(name) driver->funcs.p##
/* OpenGL32 */
GET_FUNC(wglCreateContext);
GET_FUNC(wglMakeCurrent);
+ GET_FUNC(wglShareLists);
GET_FUNC(wglUseFontBitmapsA);
GET_FUNC(wglUseFontBitmapsW);
#undef GET_FUNC
diff --git a/dlls/gdi/gdi_private.h b/dlls/gdi/gdi_private.h
index 02a1348..ec3454c 100644
--- a/dlls/gdi/gdi_private.h
+++ b/dlls/gdi/gdi_private.h
@@ -186,6 +186,7 @@ typedef struct tagDC_FUNCS
/* OpenGL32 */
HGLRC (*pwglCreateContext)(PHYSDEV);
BOOL (*pwglMakeCurrent)(PHYSDEV, HGLRC);
+ BOOL (*pwglShareLists)(HGLRC hglrc1, HGLRC hglrc2);
BOOL (*pwglUseFontBitmapsA)(PHYSDEV, DWORD, DWORD, DWORD);
BOOL (*pwglUseFontBitmapsW)(PHYSDEV, DWORD, DWORD, DWORD);
} DC_FUNCTIONS;
diff --git a/dlls/gdi/opengl.c b/dlls/gdi/opengl.c
index 95e09c6..375ff9b 100644
--- a/dlls/gdi/opengl.c
+++ b/dlls/gdi/opengl.c
@@ -136,6 +136,30 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLR
}
/***********************************************************************
+ * wglShareLists (OPENGL32.@)
+ */
+BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2)
+{
+ DC *dc;
+ BOOL ret = FALSE;
+ OPENGL_Context ctx = (OPENGL_Context)hglrc1;
+
+ TRACE("hglrc1: (%p); hglrc: (%p)\n", hglrc1, hglrc2);
+ if(ctx == NULL)
+ return FALSE;
+
+ /* Retrieve the HDC associated with the context to access the display driver */
+ dc = DC_GetDCPtr(ctx->hdc);
+ if (!dc) return FALSE;
+
+ if (!dc->funcs->pwglShareLists) FIXME(" :stub\n");
+ else ret = dc->funcs->pwglShareLists(hglrc1, hglrc2);
+
+ GDI_ReleaseObj(ctx->hdc);
+ return ret;
+}
+
+/***********************************************************************
* wglUseFontBitmapsA (OPENGL32.@)
*/
BOOL WINAPI wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD listBase)
diff --git a/dlls/opengl32/opengl32.spec b/dlls/opengl32/opengl32.spec
index 611234c..a2cee0b 100644
--- a/dlls/opengl32/opengl32.spec
+++ b/dlls/opengl32/opengl32.spec
@@ -391,7 +391,7 @@
@ stdcall wglRealizeLayerPalette(long long long)
@ stdcall wglSetLayerPaletteEntries(long long long long ptr)
@ stdcall wglSetPixelFormat(long long ptr) gdi32.SetPixelFormat
-@ stdcall wglShareLists(long long)
+@ stdcall wglShareLists(long long) gdi32.wglShareLists
@ stdcall wglSwapBuffers(long) gdi32.SwapBuffers
@ stdcall wglSwapLayerBuffers(long long)
@ stdcall wglUseFontBitmapsA(long long long long) gdi32.wglUseFontBitmapsA
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 6d38721..b4cecd2 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -49,7 +49,6 @@ WINE_DECLARE_DEBUG_CHANNEL(opengl);
typedef struct wine_wgl_s {
BOOL WINAPI (*p_wglDeleteContext)(HGLRC hglrc);
PROC WINAPI (*p_wglGetProcAddress)(LPCSTR lpszProc);
- BOOL WINAPI (*p_wglShareLists)(HGLRC hglrc1, HGLRC hglrc2);
void WINAPI (*p_wglGetIntegerv)(GLenum pname, GLint* params);
} wine_wgl_t;
@@ -281,14 +280,6 @@ int WINAPI wglSetLayerPaletteEntries(HDC
}
/***********************************************************************
- * wglShareLists (OPENGL32.@)
- */
-BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
- TRACE("(%p, %p)\n", hglrc1, hglrc2);
- return wine_wgl.p_wglShareLists(hglrc1, hglrc2);
-}
-
-/***********************************************************************
* wglSwapLayerBuffers (OPENGL32.@)
*/
BOOL WINAPI wglSwapLayerBuffers(HDC hdc,
@@ -633,7 +624,6 @@ static BOOL process_attach(void)
/* Load WGL function pointers from winex11.drv */
wine_wgl.p_wglDeleteContext = (void *)GetProcAddress(mod, "wglDeleteContext");
wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod, "wglGetProcAddress");
- wine_wgl.p_wglShareLists = (void *)GetProcAddress(mod, "wglShareLists");
/* Interal WGL function */
wine_wgl.p_wglGetIntegerv = (void *)GetProcAddress(mod, "wglGetIntegerv");
More information about the wine-cvs
mailing list