From: Enlightenment S. <no-...@en...> - 2011-05-22 13:42:14
|
Log: evas: backport r57569. Author: cedric Date: 2011-05-22 06:42:06 -0700 (Sun, 22 May 2011) New Revision: 59583 Trac: http://trac.enlightenment.org/e/changeset/59583 Modified: branches/evas-1.0/ChangeLog branches/evas-1.0/src/modules/engines/gl_x11/evas_engine.c Modified: branches/evas-1.0/ChangeLog =================================================================== --- branches/evas-1.0/ChangeLog 2011-05-22 13:40:53 UTC (rev 59582) +++ branches/evas-1.0/ChangeLog 2011-05-22 13:42:06 UTC (rev 59583) @@ -44,6 +44,11 @@ * 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. + 2011-04-06 Cedric Bail * Backport all clip fix (should improve map and textblock usage). Modified: branches/evas-1.0/src/modules/engines/gl_x11/evas_engine.c =================================================================== --- branches/evas-1.0/src/modules/engines/gl_x11/evas_engine.c 2011-05-22 13:40:53 UTC (rev 59582) +++ branches/evas-1.0/src/modules/engines/gl_x11/evas_engine.c 2011-05-22 13:42:06 UTC (rev 59583) @@ -66,7 +66,8 @@ 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 @@ 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,15 +668,24 @@ #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; + } + } else { if ((glsym_glXGetVideoSync) && (glsym_glXWaitVideoSync)) |