Commit 665a8add authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

wgl: Override glFinish and glFlush.

parent 42584658
......@@ -220,6 +220,8 @@ sub GenerateThunk($$$$$)
return "" if $func_ref->[0] eq "glDisable";
return "" if $func_ref->[0] eq "glScissor";
return "" if $func_ref->[0] eq "glViewport";
return "" if $func_ref->[0] eq "glFinish";
return "" if $func_ref->[0] eq "glFlush";
# If for opengl_norm.c, generate a nice heading otherwise Patrik won't be happy :-)
# Patrik says: Well I would be even happier if a (OPENGL32.@) was added as well. Done. :-)
......
......@@ -1060,26 +1060,6 @@ void WINAPI wine_glFeedbackBuffer( GLsizei size, GLenum type, GLfloat* buffer )
}
/***********************************************************************
* glFinish (OPENGL32.@)
*/
void WINAPI wine_glFinish( void ) {
TRACE("()\n");
ENTER_GL();
glFinish( );
LEAVE_GL();
}
/***********************************************************************
* glFlush (OPENGL32.@)
*/
void WINAPI wine_glFlush( void ) {
TRACE("()\n");
ENTER_GL();
glFlush( );
LEAVE_GL();
}
/***********************************************************************
* glFogf (OPENGL32.@)
*/
void WINAPI wine_glFogf( GLenum pname, GLfloat param ) {
......
......@@ -54,6 +54,8 @@ typedef struct wine_wgl_s {
GLboolean WINAPI (*p_wglIsEnabled)(GLenum cap);
void WINAPI (*p_wglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
void WINAPI (*p_wglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
void WINAPI (*p_wglFinish)(void);
void WINAPI (*p_wglFlush)(void);
} wine_wgl_t;
/** global wgl object */
......@@ -614,6 +616,24 @@ void WINAPI wine_glViewport( GLint x, GLint y, GLsizei width, GLsizei height )
}
/***********************************************************************
* glFinish (OPENGL32.@)
*/
void WINAPI wine_glFinish( void )
{
TRACE("()\n");
wine_wgl.p_wglFinish();
}
/***********************************************************************
* glFlush (OPENGL32.@)
*/
void WINAPI wine_glFlush( void )
{
TRACE("()\n");
wine_wgl.p_wglFlush();
}
/***********************************************************************
* glGetString (OPENGL32.@)
*/
const GLubyte * WINAPI wine_glGetString( GLenum name )
......@@ -705,6 +725,8 @@ static BOOL process_attach(void)
wine_wgl.p_wglIsEnabled = (void *)wine_wgl.p_wglGetProcAddress("wglIsEnabled");
wine_wgl.p_wglScissor = (void *)wine_wgl.p_wglGetProcAddress("wglScissor");
wine_wgl.p_wglViewport = (void *)wine_wgl.p_wglGetProcAddress("wglViewport");
wine_wgl.p_wglFinish = (void *)wine_wgl.p_wglGetProcAddress("wglFinish");
wine_wgl.p_wglFlush = (void *)wine_wgl.p_wglGetProcAddress("wglFlush");
internal_gl_disabled_extensions[0] = 0;
if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\OpenGL", &hkey)) {
......
......@@ -72,7 +72,7 @@ typedef struct wine_glextension {
struct {
const char *funcName;
void *funcAddress;
} extEntryPoints[8];
} extEntryPoints[9];
} WineGLExtension;
struct WineGLInfo {
......@@ -277,6 +277,8 @@ MAKE_FUNCPTR(glReadPixels)
MAKE_FUNCPTR(glScissor)
MAKE_FUNCPTR(glTexImage2D)
MAKE_FUNCPTR(glViewport)
MAKE_FUNCPTR(glFinish)
MAKE_FUNCPTR(glFlush)
#undef MAKE_FUNCPTR
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
......@@ -428,6 +430,8 @@ LOAD_FUNCPTR(glReadPixels)
LOAD_FUNCPTR(glScissor)
LOAD_FUNCPTR(glTexImage2D)
LOAD_FUNCPTR(glViewport)
LOAD_FUNCPTR(glFinish)
LOAD_FUNCPTR(glFlush)
#undef LOAD_FUNCPTR
/* It doesn't matter if these fail. They'll only be used if the driver reports
......@@ -2054,6 +2058,20 @@ static void WINAPI X11DRV_wglViewport(GLint x, GLint y, GLsizei width, GLsizei h
}
}
static void WINAPI X11DRV_wglFinish(void)
{
wine_tsx11_lock();
pglFinish();
wine_tsx11_unlock();
}
static void WINAPI X11DRV_wglFlush(void)
{
wine_tsx11_lock();
pglFlush();
wine_tsx11_unlock();
}
/**
* X11DRV_wglGetExtensionsStringARB
*
......@@ -3093,6 +3111,8 @@ static const WineGLExtension WGL_internal_functions =
{ "wglIsEnabled", X11DRV_wglIsEnabled },
{ "wglScissor", X11DRV_wglScissor },
{ "wglViewport", X11DRV_wglViewport },
{ "wglFinish", X11DRV_wglFinish },
{ "wglFlush", X11DRV_wglFlush },
}
};
......
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