diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-02-10 11:53:08 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-02-10 12:00:37 +0900 |
commit | 5df768a43aee6a53d1bd44155bdd08f59908aabf (patch) | |
tree | e57dd99cf4b0d3a4a9e83457fe102b9306e5e044 /src/modules/evas/engines/gl_common/evas_gl_3d.c | |
parent | 7a50f5827f8407237c002d19f28330bd372e3ec1 (diff) |
Evas 3d: Fix compilation with EGL/GLES
Please verify this. I'm not sure what the function is supposed
to return (alpha or red?).
Diffstat (limited to '')
-rw-r--r-- | src/modules/evas/engines/gl_common/evas_gl_3d.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 ee464f4d34..b1b277dc99 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, | |||
1492 | 1492 | ||
1493 | glBindFramebuffer(GL_FRAMEBUFFER, d->color_pick_fb_id); | 1493 | glBindFramebuffer(GL_FRAMEBUFFER, d->color_pick_fb_id); |
1494 | /*TODO Bottle neck - get more effective getting pixels from openGL*/ | 1494 | /*TODO Bottle neck - get more effective getting pixels from openGL*/ |
1495 | #ifndef GL_GLES | ||
1495 | glReadPixels(x, y, 1, 1, GL_RED, GL_UNSIGNED_SHORT, &pixel); | 1496 | glReadPixels(x, y, 1, 1, GL_RED, GL_UNSIGNED_SHORT, &pixel); |
1496 | glBindFramebuffer(GL_FRAMEBUFFER, d->fbo); | 1497 | glBindFramebuffer(GL_FRAMEBUFFER, d->fbo); |
1497 | return (double)pixel / USHRT_MAX; | 1498 | return (double)pixel / USHRT_MAX; |
1499 | #else | ||
1500 | // FIXME: Verify this logic. UNTESTED! (build fix was required) | ||
1501 | glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); | ||
1502 | glBindFramebuffer(GL_FRAMEBUFFER, d->fbo); | ||
1503 | return ((double)R_VAL(&pixel)) / 255.0; | ||
1504 | #endif | ||
1498 | } | 1505 | } |
1499 | 1506 | ||
1500 | #undef RENDER_MESH_NODE_ITERATE_BEGIN | 1507 | #undef RENDER_MESH_NODE_ITERATE_BEGIN |