gdi32: Forward SwapBuffers to opengl32 which in turn calls GdiSwapBuffers.
This commit is contained in:
parent
c013945728
commit
67e7eda96c
|
@ -218,7 +218,7 @@
|
||||||
@ stub GdiSetServerAttr
|
@ stub GdiSetServerAttr
|
||||||
# @ stub GdiStartDocEMF
|
# @ stub GdiStartDocEMF
|
||||||
# @ stub GdiStartPageEMF
|
# @ stub GdiStartPageEMF
|
||||||
# @ stub GdiSwapBuffers
|
@ stdcall GdiSwapBuffers(long)
|
||||||
@ stdcall GdiTransparentBlt(long long long long long long long long long long long)
|
@ stdcall GdiTransparentBlt(long long long long long long long long long long long)
|
||||||
# @ stub GdiValidateHandle
|
# @ stub GdiValidateHandle
|
||||||
@ stub GdiWinWatchClose
|
@ stub GdiWinWatchClose
|
||||||
|
|
|
@ -43,6 +43,7 @@ static HMODULE opengl32;
|
||||||
static INT (WINAPI *wglChoosePixelFormat)(HDC,const PIXELFORMATDESCRIPTOR *);
|
static INT (WINAPI *wglChoosePixelFormat)(HDC,const PIXELFORMATDESCRIPTOR *);
|
||||||
static INT (WINAPI *wglDescribePixelFormat)(HDC,INT,UINT,PIXELFORMATDESCRIPTOR*);
|
static INT (WINAPI *wglDescribePixelFormat)(HDC,INT,UINT,PIXELFORMATDESCRIPTOR*);
|
||||||
static BOOL (WINAPI *wglSetPixelFormat)(HDC,INT,const PIXELFORMATDESCRIPTOR*);
|
static BOOL (WINAPI *wglSetPixelFormat)(HDC,INT,const PIXELFORMATDESCRIPTOR*);
|
||||||
|
static BOOL (WINAPI *wglSwapBuffers)(HDC);
|
||||||
|
|
||||||
static HDC default_hdc = 0;
|
static HDC default_hdc = 0;
|
||||||
|
|
||||||
|
@ -267,3 +268,17 @@ BOOL WINAPI SetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd )
|
||||||
}
|
}
|
||||||
return wglSetPixelFormat( hdc, fmt, pfd );
|
return wglSetPixelFormat( hdc, fmt, pfd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* SwapBuffers (GDI32.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI SwapBuffers( HDC hdc )
|
||||||
|
{
|
||||||
|
if (!wglSwapBuffers)
|
||||||
|
{
|
||||||
|
if (!opengl32) opengl32 = LoadLibraryW( opengl32W );
|
||||||
|
if (!(wglSwapBuffers = (void *)GetProcAddress( opengl32, "wglSwapBuffers" )))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return wglSwapBuffers( hdc );
|
||||||
|
}
|
||||||
|
|
|
@ -562,17 +562,11 @@ INT WINAPI GdiDescribePixelFormat( HDC hdc, INT iPixelFormat, UINT nBytes,
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* SwapBuffers [GDI32.@]
|
* GdiSwapBuffers [GDI32.@]
|
||||||
* Exchanges front and back buffers of window
|
|
||||||
*
|
*
|
||||||
* PARAMS
|
* Probably not the correct semantics, it's supposed to be an internal backend for SwapBuffers.
|
||||||
* hdc [I] Device context whose buffers get swapped
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* Success: TRUE
|
|
||||||
* Failure: FALSE
|
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI SwapBuffers( HDC hdc )
|
BOOL WINAPI GdiSwapBuffers( HDC hdc )
|
||||||
{
|
{
|
||||||
INT bRet = FALSE;
|
INT bRet = FALSE;
|
||||||
DC * dc = get_dc_ptr( hdc );
|
DC * dc = get_dc_ptr( hdc );
|
||||||
|
|
|
@ -90,6 +90,7 @@ const GLubyte * WINAPI wine_glGetString( GLenum name );
|
||||||
/* internal GDI functions */
|
/* internal GDI functions */
|
||||||
extern INT WINAPI GdiDescribePixelFormat( HDC hdc, INT fmt, UINT size, PIXELFORMATDESCRIPTOR *pfd );
|
extern INT WINAPI GdiDescribePixelFormat( HDC hdc, INT fmt, UINT size, PIXELFORMATDESCRIPTOR *pfd );
|
||||||
extern BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd );
|
extern BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd );
|
||||||
|
extern BOOL WINAPI GdiSwapBuffers( HDC hdc );
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* wglSetPixelFormat(OPENGL32.@)
|
* wglSetPixelFormat(OPENGL32.@)
|
||||||
|
@ -560,7 +561,7 @@ BOOL WINAPI wglSwapLayerBuffers(HDC hdc,
|
||||||
TRACE_(opengl)("(%p, %08x)\n", hdc, fuPlanes);
|
TRACE_(opengl)("(%p, %08x)\n", hdc, fuPlanes);
|
||||||
|
|
||||||
if (fuPlanes & WGL_SWAP_MAIN_PLANE) {
|
if (fuPlanes & WGL_SWAP_MAIN_PLANE) {
|
||||||
if (!SwapBuffers(hdc)) return FALSE;
|
if (!GdiSwapBuffers(hdc)) return FALSE;
|
||||||
fuPlanes &= ~WGL_SWAP_MAIN_PLANE;
|
fuPlanes &= ~WGL_SWAP_MAIN_PLANE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1062,7 +1063,7 @@ void WINAPI wine_glGetIntegerv( GLenum pname, GLint* params )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DECLSPEC_HOTPATCH wglSwapBuffers( HDC hdc )
|
BOOL WINAPI DECLSPEC_HOTPATCH wglSwapBuffers( HDC hdc )
|
||||||
{
|
{
|
||||||
return SwapBuffers(hdc);
|
return GdiSwapBuffers(hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is for brain-dead applications that use OpenGL functions before even
|
/* This is for brain-dead applications that use OpenGL functions before even
|
||||||
|
|
Loading…
Reference in New Issue