opengl32: Use wrappers for wglCreateContext and wglMakeCurrent instead of directly forwarding to gdi32.
This commit is contained in:
parent
e14e83837f
commit
8a2e38cc45
|
@ -336,7 +336,7 @@
|
||||||
@ stdcall glViewport( long long long long ) wine_glViewport
|
@ stdcall glViewport( long long long long ) wine_glViewport
|
||||||
@ stdcall wglChoosePixelFormat(long ptr) gdi32.ChoosePixelFormat
|
@ stdcall wglChoosePixelFormat(long ptr) gdi32.ChoosePixelFormat
|
||||||
@ stdcall wglCopyContext(long long long) gdi32.wglCopyContext
|
@ stdcall wglCopyContext(long long long) gdi32.wglCopyContext
|
||||||
@ stdcall wglCreateContext(long) gdi32.wglCreateContext
|
@ stdcall wglCreateContext(long)
|
||||||
@ stdcall wglCreateLayerContext(long long)
|
@ stdcall wglCreateLayerContext(long long)
|
||||||
@ stdcall wglDeleteContext(long) gdi32.wglDeleteContext
|
@ stdcall wglDeleteContext(long) gdi32.wglDeleteContext
|
||||||
@ stdcall wglDescribeLayerPlane(long long long long ptr)
|
@ stdcall wglDescribeLayerPlane(long long long long ptr)
|
||||||
|
@ -347,7 +347,7 @@
|
||||||
@ stdcall wglGetLayerPaletteEntries(long long long long ptr)
|
@ stdcall wglGetLayerPaletteEntries(long long long long ptr)
|
||||||
@ stdcall wglGetPixelFormat(long) gdi32.GetPixelFormat
|
@ stdcall wglGetPixelFormat(long) gdi32.GetPixelFormat
|
||||||
@ stdcall wglGetProcAddress(str)
|
@ stdcall wglGetProcAddress(str)
|
||||||
@ stdcall wglMakeCurrent(long long) gdi32.wglMakeCurrent
|
@ stdcall wglMakeCurrent(long long)
|
||||||
@ stdcall wglRealizeLayerPalette(long long long)
|
@ stdcall wglRealizeLayerPalette(long long long)
|
||||||
@ stdcall wglSetLayerPaletteEntries(long long long long ptr)
|
@ stdcall wglSetLayerPaletteEntries(long long long long ptr)
|
||||||
@ stdcall wglSetPixelFormat(long long ptr) gdi32.SetPixelFormat
|
@ stdcall wglSetPixelFormat(long long ptr) gdi32.SetPixelFormat
|
||||||
|
|
|
@ -45,16 +45,15 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(wgl);
|
WINE_DEFAULT_DEBUG_CHANNEL(wgl);
|
||||||
WINE_DECLARE_DEBUG_CHANNEL(opengl);
|
WINE_DECLARE_DEBUG_CHANNEL(opengl);
|
||||||
|
|
||||||
typedef struct wine_wgl_s {
|
static struct
|
||||||
PROC WINAPI (*p_wglGetProcAddress)(LPCSTR lpszProc);
|
{
|
||||||
|
PROC (WINAPI *p_wglGetProcAddress)(LPCSTR lpszProc);
|
||||||
void WINAPI (*p_wglGetIntegerv)(GLenum pname, GLint* params);
|
BOOL (WINAPI *p_wglMakeCurrent)(HDC hdc, HGLRC hglrc);
|
||||||
void WINAPI (*p_wglFinish)(void);
|
HGLRC (WINAPI *p_wglCreateContext)(HDC hdc);
|
||||||
void WINAPI (*p_wglFlush)(void);
|
void (WINAPI *p_wglGetIntegerv)(GLenum pname, GLint* params);
|
||||||
} wine_wgl_t;
|
void (WINAPI *p_wglFinish)(void);
|
||||||
|
void (WINAPI *p_wglFlush)(void);
|
||||||
/** global wgl object */
|
} wine_wgl;
|
||||||
static wine_wgl_t wine_wgl;
|
|
||||||
|
|
||||||
#ifdef SONAME_LIBGLU
|
#ifdef SONAME_LIBGLU
|
||||||
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
|
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
|
||||||
|
@ -116,6 +115,22 @@ void enter_gl(void)
|
||||||
|
|
||||||
const GLubyte * WINAPI wine_glGetString( GLenum name );
|
const GLubyte * WINAPI wine_glGetString( GLenum name );
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* wglMakeCurrent (OPENGL32.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
|
||||||
|
{
|
||||||
|
return wine_wgl.p_wglMakeCurrent(hdc, hglrc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* wglCreateContext (OPENGL32.@)
|
||||||
|
*/
|
||||||
|
HGLRC WINAPI wglCreateContext(HDC hdc)
|
||||||
|
{
|
||||||
|
return wine_wgl.p_wglCreateContext(hdc);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* wglCreateLayerContext (OPENGL32.@)
|
* wglCreateLayerContext (OPENGL32.@)
|
||||||
*/
|
*/
|
||||||
|
@ -720,6 +735,8 @@ static BOOL process_attach(void)
|
||||||
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod_x11, "wine_tsx11_unlock" );
|
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod_x11, "wine_tsx11_unlock" );
|
||||||
|
|
||||||
wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod_gdi32, "wglGetProcAddress");
|
wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod_gdi32, "wglGetProcAddress");
|
||||||
|
wine_wgl.p_wglMakeCurrent = (void *)GetProcAddress(mod_gdi32, "wglMakeCurrent");
|
||||||
|
wine_wgl.p_wglCreateContext = (void *)GetProcAddress(mod_gdi32, "wglCreateContext");
|
||||||
|
|
||||||
/* Interal WGL function */
|
/* Interal WGL function */
|
||||||
wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv");
|
wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv");
|
||||||
|
|
Loading…
Reference in New Issue