diff --git a/dlls/gdi/driver.c b/dlls/gdi/driver.c index db2086c5023..f5900e2bd7a 100644 --- a/dlls/gdi/driver.c +++ b/dlls/gdi/driver.c @@ -198,6 +198,7 @@ static struct graphics_driver *create_driver( HMODULE module ) /* 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 02a13489279..ec3454cb418 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 95e09c6a5f3..375ff9b7be7 100644 --- a/dlls/gdi/opengl.c +++ b/dlls/gdi/opengl.c @@ -135,6 +135,30 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc) return ret; } +/*********************************************************************** + * 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.@) */ diff --git a/dlls/opengl32/opengl32.spec b/dlls/opengl32/opengl32.spec index 611234cff4c..a2cee0ba96f 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 6d387217a65..b4cecd2f0fe 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; @@ -280,14 +279,6 @@ int WINAPI wglSetLayerPaletteEntries(HDC hdc, return 0; } -/*********************************************************************** - * wglShareLists (OPENGL32.@) - */ -BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { - TRACE("(%p, %p)\n", hglrc1, hglrc2); - return wine_wgl.p_wglShareLists(hglrc1, hglrc2); -} - /*********************************************************************** * wglSwapLayerBuffers (OPENGL32.@) */ @@ -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");