mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
opengl32: Move wglMakeContextCurrentARB to the WGL driver.
This commit is contained in:
parent
7a031d9b92
commit
47fe838b15
@ -132,6 +132,14 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
|
|||||||
return wgl_driver->p_wglMakeCurrent(hdc, hglrc);
|
return wgl_driver->p_wglMakeCurrent(hdc, hglrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* wglMakeContextCurrentARB (wrapper for the extension function returned by the driver)
|
||||||
|
*/
|
||||||
|
static BOOL WINAPI wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, HGLRC hglrc )
|
||||||
|
{
|
||||||
|
return wgl_driver->p_wglMakeContextCurrentARB( draw_hdc, read_hdc, hglrc );
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* wglShareLists (OPENGL32.@)
|
* wglShareLists (OPENGL32.@)
|
||||||
*/
|
*/
|
||||||
@ -487,7 +495,20 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) {
|
|||||||
if (ext_ret == NULL) {
|
if (ext_ret == NULL) {
|
||||||
/* If the function name starts with a 'w', it is a WGL extension */
|
/* If the function name starts with a 'w', it is a WGL extension */
|
||||||
if(lpszProc[0] == 'w')
|
if(lpszProc[0] == 'w')
|
||||||
return wine_wgl.p_wglGetProcAddress(lpszProc);
|
{
|
||||||
|
local_func = wine_wgl.p_wglGetProcAddress( lpszProc );
|
||||||
|
if (local_func == (void *)1) /* special function that needs a wrapper */
|
||||||
|
{
|
||||||
|
if (!strcmp( lpszProc, "wglMakeContextCurrentARB" ))
|
||||||
|
local_func = wglMakeContextCurrentARB;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FIXME( "wrapper missing for %s\n", lpszProc );
|
||||||
|
local_func = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return local_func;
|
||||||
|
}
|
||||||
|
|
||||||
/* We are dealing with an unknown GL extension */
|
/* We are dealing with an unknown GL extension */
|
||||||
WARN("Extension '%s' not defined in opengl32.dll's function table!\n", lpszProc);
|
WARN("Extension '%s' not defined in opengl32.dll's function table!\n", lpszProc);
|
||||||
|
@ -1654,12 +1654,10 @@ static BOOL glxdrv_wglMakeCurrent(HDC hdc, HGLRC hglrc)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/***********************************************************************
|
||||||
* X11DRV_wglMakeContextCurrentARB
|
* glxdrv_wglMakeContextCurrentARB
|
||||||
*
|
|
||||||
* For OpenGL32 wglMakeContextCurrentARB
|
|
||||||
*/
|
*/
|
||||||
static BOOL WINAPI X11DRV_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, HGLRC hglrc )
|
static BOOL glxdrv_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, HGLRC hglrc )
|
||||||
{
|
{
|
||||||
Wine_GLContext *ctx = (Wine_GLContext *)hglrc;
|
Wine_GLContext *ctx = (Wine_GLContext *)hglrc;
|
||||||
Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext;
|
Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext;
|
||||||
@ -3095,7 +3093,7 @@ static const WineGLExtension WGL_ARB_make_current_read =
|
|||||||
"WGL_ARB_make_current_read",
|
"WGL_ARB_make_current_read",
|
||||||
{
|
{
|
||||||
{ "wglGetCurrentReadDCARB", X11DRV_wglGetCurrentReadDCARB },
|
{ "wglGetCurrentReadDCARB", X11DRV_wglGetCurrentReadDCARB },
|
||||||
{ "wglMakeContextCurrentARB", X11DRV_wglMakeContextCurrentARB },
|
{ "wglMakeContextCurrentARB", (void *)1 /* called through the glxdrv_wgl_funcs driver */ },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3604,6 +3602,7 @@ static const struct wgl_funcs glxdrv_wgl_funcs =
|
|||||||
glxdrv_wglCopyContext, /* p_wglCopyContext */
|
glxdrv_wglCopyContext, /* p_wglCopyContext */
|
||||||
glxdrv_wglDeleteContext, /* p_wglDeleteContext */
|
glxdrv_wglDeleteContext, /* p_wglDeleteContext */
|
||||||
glxdrv_wglGetCurrentDC, /* p_wglGetCurrentDC */
|
glxdrv_wglGetCurrentDC, /* p_wglGetCurrentDC */
|
||||||
|
glxdrv_wglMakeContextCurrentARB, /* p_wglMakeContextCurrentARB */
|
||||||
glxdrv_wglMakeCurrent, /* p_wglMakeCurrent */
|
glxdrv_wglMakeCurrent, /* p_wglMakeCurrent */
|
||||||
glxdrv_wglShareLists, /* p_wglShareLists */
|
glxdrv_wglShareLists, /* p_wglShareLists */
|
||||||
};
|
};
|
||||||
|
@ -203,7 +203,7 @@ struct gdi_dc_funcs
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* increment this when you change the DC function table */
|
/* increment this when you change the DC function table */
|
||||||
#define WINE_GDI_DRIVER_VERSION 33
|
#define WINE_GDI_DRIVER_VERSION 34
|
||||||
|
|
||||||
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
|
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
|
||||||
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
|
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
|
||||||
@ -236,6 +236,7 @@ struct wgl_funcs
|
|||||||
BOOL (*p_wglCopyContext)(HGLRC,HGLRC,UINT);
|
BOOL (*p_wglCopyContext)(HGLRC,HGLRC,UINT);
|
||||||
BOOL (*p_wglDeleteContext)(HGLRC);
|
BOOL (*p_wglDeleteContext)(HGLRC);
|
||||||
HDC (*p_wglGetCurrentDC)(void);
|
HDC (*p_wglGetCurrentDC)(void);
|
||||||
|
BOOL (*p_wglMakeContextCurrentARB)(HDC,HDC,HGLRC);
|
||||||
BOOL (*p_wglMakeCurrent)(HDC,HGLRC);
|
BOOL (*p_wglMakeCurrent)(HDC,HGLRC);
|
||||||
BOOL (*p_wglShareLists)(HGLRC,HGLRC);
|
BOOL (*p_wglShareLists)(HGLRC,HGLRC);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user