2 different sync apis with differetn ext's. fix.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Mar 2011 11:20:49 +0000 (11:20 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Mar 2011 11:20:49 +0000 (11:20 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@57569 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/modules/engines/gl_x11/evas_engine.c

index 0ddbb3c..6c9cd16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 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.
+
index 9fa9227..1b4758c 100644 (file)
@@ -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_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_glxSwapInterval(1);
-                  else glsym_glxSwapInterval(0);
+                  if (re->info->vsync) glsym_glxSwapIntervalSGI(1);
+                  else glsym_glxSwapIntervalSGI(0);
                   re->vsync = 1;
                }
           }