diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index 0ddbb3c18e..6c9cd16ba8 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -139,3 +139,9 @@ 2011-03-07 Mike Blumenkrantz * Fix segv when trying to set gl viewpoint with NULL ctx + +2011-03-08 Carsten Haitzler (The Rasterman) + + * Fix problem with different x vsync api between SGI and EXT flavor + as they have the same base name, but different prototypes. + diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c index 9fa9227e9c..1b4758c160 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c @@ -66,7 +66,8 @@ int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL; XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL; void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL; void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL; -void (*glsym_glxSwapInterval) (int a) = NULL; +int (*glsym_glxSwapIntervalSGI) (int a) = NULL; +void (*glsym_glxSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL; #endif static void @@ -140,10 +141,9 @@ _sym_init(void) FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableEXT", glsym_func_void); FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableARB", glsym_func_void); - FINDSYM(glsym_glxSwapInterval, "glxSwapInterval", glsym_func_void); - FINDSYM(glsym_glxSwapInterval, "glxSwapIntervalEXT", glsym_func_void); - FINDSYM(glsym_glxSwapInterval, "glxSwapIntervalARB", glsym_func_void); - FINDSYM(glsym_glxSwapInterval, "glxSwapIntervalSGI", glsym_func_void); + FINDSYM(glsym_glxSwapIntervalSGI, "glxSwapIntervalSGI", glsym_func_int); + + FINDSYM(glsym_glxSwapIntervalEXT, "glxSwapIntervalEXT", glsym_func_void); #endif } @@ -668,12 +668,21 @@ eng_output_flush(void *data) #ifdef VSYNC_TO_SCREEN if ((re->info->vsync)/* || (1)*/) { - if (glsym_glxSwapInterval) + if (glsym_glxSwapIntervalEXT) { if (!re->vsync) { - if (re->info->vsync) glsym_glxSwapInterval(1); - else glsym_glxSwapInterval(0); + if (re->info->vsync) glsym_glxSwapIntervalEXT(re->win->disp, re->win->win, 1); + else glsym_glxSwapIntervalEXT(re->win->disp, re->win->win, 0); + re->vsync = 1; + } + } + if (glsym_glxSwapIntervalSGI) + { + if (!re->vsync) + { + if (re->info->vsync) glsym_glxSwapIntervalSGI(1); + else glsym_glxSwapIntervalSGI(0); re->vsync = 1; } }