jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5df768a43aee6a53d1bd44155bdd08f59908aabf

commit 5df768a43aee6a53d1bd44155bdd08f59908aabf
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Feb 10 11:53:08 2015 +0900

    Evas 3d: Fix compilation with EGL/GLES
    
    Please verify this. I'm not sure what the function is supposed
    to return (alpha or red?).
---
 src/modules/evas/engines/gl_common/evas_gl_3d.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_3d.c 
b/src/modules/evas/engines/gl_common/evas_gl_3d.c
index ee464f4..b1b277d 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_3d.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_3d.c
@@ -1492,9 +1492,16 @@ e3d_drawable_texture_pixel_color_get(GLuint tex 
EINA_UNUSED, int x, int y,
 
    glBindFramebuffer(GL_FRAMEBUFFER, d->color_pick_fb_id);
    /*TODO Bottle neck - get more effective getting pixels from openGL*/
+#ifndef GL_GLES
    glReadPixels(x, y, 1, 1, GL_RED, GL_UNSIGNED_SHORT, &pixel);
    glBindFramebuffer(GL_FRAMEBUFFER, d->fbo);
    return (double)pixel / USHRT_MAX;
+#else
+   // FIXME: Verify this logic. UNTESTED! (build fix was required)
+   glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel);
+   glBindFramebuffer(GL_FRAMEBUFFER, d->fbo);
+   return ((double)R_VAL(&pixel)) / 255.0;
+#endif
 }
 
 #undef RENDER_MESH_NODE_ITERATE_BEGIN

-- 


Reply via email to