Commit 7eea8b93 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wgl: Move wglDeleteContext to gdi32.

parent 449e8557
...@@ -197,6 +197,7 @@ static struct graphics_driver *create_driver( HMODULE module ) ...@@ -197,6 +197,7 @@ static struct graphics_driver *create_driver( HMODULE module )
/* OpenGL32 */ /* OpenGL32 */
GET_FUNC(wglCreateContext); GET_FUNC(wglCreateContext);
GET_FUNC(wglDeleteContext);
GET_FUNC(wglMakeCurrent); GET_FUNC(wglMakeCurrent);
GET_FUNC(wglShareLists); GET_FUNC(wglShareLists);
GET_FUNC(wglUseFontBitmapsA); GET_FUNC(wglUseFontBitmapsA);
......
...@@ -185,6 +185,7 @@ typedef struct tagDC_FUNCS ...@@ -185,6 +185,7 @@ typedef struct tagDC_FUNCS
/* OpenGL32 */ /* OpenGL32 */
HGLRC (*pwglCreateContext)(PHYSDEV); HGLRC (*pwglCreateContext)(PHYSDEV);
BOOL (*pwglDeleteContext)(HGLRC);
BOOL (*pwglMakeCurrent)(PHYSDEV, HGLRC); BOOL (*pwglMakeCurrent)(PHYSDEV, HGLRC);
BOOL (*pwglShareLists)(HGLRC hglrc1, HGLRC hglrc2); BOOL (*pwglShareLists)(HGLRC hglrc1, HGLRC hglrc2);
BOOL (*pwglUseFontBitmapsA)(PHYSDEV, DWORD, DWORD, DWORD); BOOL (*pwglUseFontBitmapsA)(PHYSDEV, DWORD, DWORD, DWORD);
......
...@@ -79,6 +79,31 @@ HGLRC WINAPI wglCreateContext(HDC hdc) ...@@ -79,6 +79,31 @@ HGLRC WINAPI wglCreateContext(HDC hdc)
return ret; return ret;
} }
/***********************************************************************
* wglDeleteContext (OPENGL32.@)
*/
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
{
DC *dc;
BOOL ret = FALSE;
OPENGL_Context ctx = (OPENGL_Context)hglrc;
TRACE("hglrc: (%p)\n", hglrc);
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->pwglDeleteContext) FIXME(" :stub\n");
else ret = dc->funcs->pwglDeleteContext(hglrc);
GDI_ReleaseObj(ctx->hdc);
return ret;
}
/*********************************************************************** /***********************************************************************
* wglGetCurrentContext (OPENGL32.@) * wglGetCurrentContext (OPENGL32.@)
*/ */
......
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
@ stdcall wglCopyContext(long long long) @ stdcall wglCopyContext(long long long)
@ stdcall wglCreateContext(long) gdi32.wglCreateContext @ stdcall wglCreateContext(long) gdi32.wglCreateContext
@ stdcall wglCreateLayerContext(long long) @ stdcall wglCreateLayerContext(long long)
@ stdcall wglDeleteContext(long) @ stdcall wglDeleteContext(long) gdi32.wglDeleteContext
@ stdcall wglDescribeLayerPlane(long long long long ptr) @ stdcall wglDescribeLayerPlane(long long long long ptr)
@ stdcall wglDescribePixelFormat(long long long ptr) gdi32.DescribePixelFormat @ stdcall wglDescribePixelFormat(long long long ptr) gdi32.DescribePixelFormat
@ stdcall wglGetCurrentContext() gdi32.wglGetCurrentContext @ stdcall wglGetCurrentContext() gdi32.wglGetCurrentContext
......
...@@ -47,7 +47,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl); ...@@ -47,7 +47,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl);
WINE_DECLARE_DEBUG_CHANNEL(opengl); WINE_DECLARE_DEBUG_CHANNEL(opengl);
typedef struct wine_wgl_s { typedef struct wine_wgl_s {
BOOL WINAPI (*p_wglDeleteContext)(HGLRC hglrc);
PROC WINAPI (*p_wglGetProcAddress)(LPCSTR lpszProc); PROC WINAPI (*p_wglGetProcAddress)(LPCSTR lpszProc);
void WINAPI (*p_wglGetIntegerv)(GLenum pname, GLint* params); void WINAPI (*p_wglGetIntegerv)(GLenum pname, GLint* params);
...@@ -148,15 +147,6 @@ BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, ...@@ -148,15 +147,6 @@ BOOL WINAPI wglCopyContext(HGLRC hglrcSrc,
} }
/*********************************************************************** /***********************************************************************
* wglDeleteContext (OPENGL32.@)
*/
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
{
TRACE("(%p)\n", hglrc);
return wine_wgl.p_wglDeleteContext(hglrc);
}
/***********************************************************************
* wglDescribeLayerPlane (OPENGL32.@) * wglDescribeLayerPlane (OPENGL32.@)
*/ */
BOOL WINAPI wglDescribeLayerPlane(HDC hdc, BOOL WINAPI wglDescribeLayerPlane(HDC hdc,
...@@ -622,7 +612,6 @@ static BOOL process_attach(void) ...@@ -622,7 +612,6 @@ static BOOL process_attach(void)
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" ); wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
/* Load WGL function pointers from winex11.drv */ /* 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_wglGetProcAddress = (void *)GetProcAddress(mod, "wglGetProcAddress");
/* Interal WGL function */ /* Interal WGL function */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment