From: Rémi Bernon rbernon@codeweavers.com
--- dlls/opengl32/make_opengl | 1 + dlls/opengl32/unix_private.h | 1 + dlls/opengl32/unix_thunks.c | 3 +-- dlls/opengl32/unix_wgl.c | 7 +++++++ 4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index d43ee4abf3e..17e44ec824a 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -197,6 +197,7 @@ my %manual_win_thunks = ); my %manual_unix_thunks = ( + "glClear" => 1, "glDebugMessageCallback" => 1, "glDebugMessageCallbackAMD" => 1, "glDebugMessageCallbackARB" => 1, diff --git a/dlls/opengl32/unix_private.h b/dlls/opengl32/unix_private.h index c15bda2c99a..e51ae08161c 100644 --- a/dlls/opengl32/unix_private.h +++ b/dlls/opengl32/unix_private.h @@ -82,6 +82,7 @@ extern PROC wrap_wglGetProcAddress( TEB *teb, LPCSTR lpszProc ); extern BOOL wrap_wglMakeCurrent( TEB *teb, HDC hDc, HGLRC newContext ); extern void wrap_glFinish( TEB *teb ); extern void wrap_glFlush( TEB *teb ); +extern void wrap_glClear( TEB *teb, GLbitfield mask ); extern void wrap_glDrawPixels( TEB *teb, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels ); extern void wrap_glReadPixels( TEB *teb, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels ); extern void wrap_glViewport( TEB *teb, GLint x, GLint y, GLsizei width, GLsizei height ); diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index 91aaadbe9c0..a3c0c5aa817 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -196,8 +196,7 @@ static NTSTATUS gl_glCallLists( void *args ) static NTSTATUS gl_glClear( void *args ) { struct glClear_params *params = args; - const struct opengl_funcs *funcs = params->teb->glTable; - funcs->p_glClear( params->mask ); + wrap_glClear( params->teb, params->mask ); set_context_attribute( params->teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; } diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index d203f4781a7..7f3fb1f9927 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1010,6 +1010,13 @@ void wrap_glFlush( TEB *teb ) flush_context( teb, funcs->p_glFlush ); }
+void wrap_glClear( TEB *teb, GLbitfield mask ) +{ + const struct opengl_funcs *funcs = teb->glTable; + flush_context( teb, NULL ); + funcs->p_glClear( mask ); +} + void wrap_glDrawPixels( TEB *teb, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels ) { const struct opengl_funcs *funcs = teb->glTable;