Module: wine Branch: master Commit: 6c6afb2ce9517d0d10ad0feb369d34f1ee2fa369 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6c6afb2ce9517d0d10ad0feb3...
Author: Ken Thomases ken@codeweavers.com Date: Thu Oct 17 17:53:45 2019 -0500
winemac: Fix redirection of OpenGL extension functions.
This never worked. opengl_funcs.ext.p_<func> would always be NULL at the time it was checked, so nothing would be changed.
Signed-off-by: Ken Thomases ken@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winemac.drv/opengl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index 8625350b2c..5197e15fbb 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -4277,6 +4277,9 @@ static BOOL init_opengl(void) } }
+ if (!init_gl_info()) + goto failed; + /* redirect some standard OpenGL functions */ #define REDIRECT(func) \ do { p##func = opengl_funcs.gl.p_##func; opengl_funcs.gl.p_##func = macdrv_##func; } while(0) @@ -4292,13 +4295,10 @@ static BOOL init_opengl(void)
/* redirect some OpenGL extension functions */ #define REDIRECT(func) \ - do { if (opengl_funcs.ext.p_##func) { p##func = opengl_funcs.ext.p_##func; opengl_funcs.ext.p_##func = macdrv_##func; } } while(0) + do { if ((p##func = wine_dlsym(opengl_handle, #func, NULL, 0))) { opengl_funcs.ext.p_##func = macdrv_##func; } } while(0) REDIRECT(glCopyColorTable); #undef REDIRECT
- if (!init_gl_info()) - goto failed; - if (gluCheckExtension((GLubyte*)"GL_APPLE_flush_render", (GLubyte*)gl_info.glExtensions)) pglFlushRenderAPPLE = wine_dlsym(opengl_handle, "glFlushRenderAPPLE", NULL, 0);