antognolli pushed a commit to branch master.

commit 3a654f795cbb15ca039f7f67b09f6589945daa7d
Author: Rafael Antognolli <[email protected]>
Date:   Wed Aug 21 12:39:17 2013 -0300

    evas/gl: Don't look for EXT and ARB extensions when on GLES.
    
    At least on recent mesa (since commit 9f07ca11c17), it will find the
    mentioned symbols but they won't really work, leading to error messages,
    and possibly some other errors. So far, I just ifdef'ed the
    glGenFramebuffer and glBindFramebuffer functions, but it may require
    others to be ifdef'ed too.
    
    This is just a workaround, to fix https://phab.enlightenment.org/T246.
---
 src/modules/evas/engines/gl_common/evas_gl_context.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index d1b2c7e..ea8194c 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -95,20 +95,32 @@ gl_symbols(void)
 #endif
 #define FINDSYM2(dst, sym, typ) if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym)
 #define FALLBAK(dst, typ) if (!dst) dst = (typ)sym_missing
-   
+
+#ifdef GL_GLES
+   FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void);
+   FINDSYM2(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void);
+   FALLBAK(glsym_glGenFramebuffers, glsym_func_void);
+#else
    FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffersEXT", glsym_func_void);
    FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffersARB", glsym_func_void);
    FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void);
    // nvidia tegra3 drivers seem to not expose via getprocaddress, but dlsym 
finds it
    FINDSYM2(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void);
    FALLBAK(glsym_glGenFramebuffers, glsym_func_void);
+#endif
 
+#ifdef GL_GLES
+   FINDSYM(glsym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void);
+   FINDSYM2(glsym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void);
+   FALLBAK(glsym_glBindFramebuffer, glsym_func_void);
+#else
    FINDSYM(glsym_glBindFramebuffer, "glBindFramebufferEXT", glsym_func_void);
    FINDSYM(glsym_glBindFramebuffer, "glBindFramebufferARB", glsym_func_void);
    FINDSYM(glsym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void);
    // nvidia tegra3 drivers seem to not expose via getprocaddress, but dlsym 
finds it
    FINDSYM2(glsym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void);
    FALLBAK(glsym_glBindFramebuffer, glsym_func_void);
+#endif
 
    FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2DEXT", 
glsym_func_void);
    FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2DARB", 
glsym_func_void);

-- 

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk

Reply via email to