Evas filters: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER

GL_READ_FRAMEBUFFER isn't defined when compiling for Wayland
Thanks Stefan for the report.

Also, import GL_FRAMEBUFFER overrides from other GL files, so
that it points to the proper extension (_OES or _EXT if applicable).
This commit is contained in:
Jean-Philippe Andre 2014-03-07 17:45:16 +09:00
parent 99a17f85c0
commit a6950567a3
1 changed files with 12 additions and 2 deletions

View File

@ -3425,9 +3425,19 @@ eng_gl_surface_read_pixels(void *data, void *surface,
return EINA_FALSE;
}
glsym_glBindFramebuffer(GL_READ_FRAMEBUFFER, im->tex->pt->fb);
#ifdef GL_GLES
# ifndef GL_FRAMEBUFFER
# define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES
# endif
#else
# ifndef GL_FRAMEBUFFER
# define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT
# endif
#endif
glsym_glBindFramebuffer(GL_FRAMEBUFFER, im->tex->pt->fb);
glsym_glReadPixels(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
glsym_glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0);
return EINA_TRUE;
}
//--------------------------------//