cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=101929b3f43f990a8add8fc51f1f6e2e6a7280a4

commit 101929b3f43f990a8add8fc51f1f6e2e6a7280a4
Author: Raoul Hecky <[email protected]>
Date:   Tue Jun 17 22:15:21 2014 +0200

    evas_gl: add more matching formats to make cocoa_gl happy
---
 src/modules/evas/engines/gl_common/evas_gl_texture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c 
b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index 8b52a98..29a5594 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -77,6 +77,7 @@ static const struct {
   { EINA_FALSE, EINA_TRUE, EVAS_COLORSPACE_RGBA8_ETC2_EAC, &etc2_rgba_fmt, 
&etc2_rgba_fmt }
 };
 
+static const GLenum matching_rgb[] = { GL_RGB4, GL_RGB8, GL_RGB12, GL_RGB16, 
0x0 };
 static const GLenum matching_rgba[] = { GL_RGBA4, GL_RGBA8, GL_RGBA12, 
GL_RGBA16, 0x0 };
 static const GLenum matching_alpha[] = { GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, 
GL_ALPHA16, 0x0 };
 static const GLenum matching_luminance[] = { GL_LUMINANCE4, GL_LUMINANCE8, 
GL_LUMINANCE12, GL_LUMINANCE16, 0x0 };
@@ -86,8 +87,10 @@ static const struct {
    GLenum master;
    const GLenum *matching;
 } matching_fmt[] = {
+  { GL_RGB, matching_rgb },
   { GL_RGBA, matching_rgba },
   { GL_ALPHA, matching_alpha },
+  { GL_ALPHA4, matching_alpha },
   { GL_LUMINANCE, matching_luminance },
   { GL_LUMINANCE_ALPHA, matching_luminance_alpha }
 };
@@ -252,7 +255,7 @@ _tex_2d(Evas_Engine_GL_Context *gc, int intfmt, int w, int 
h, int fmt, int type)
                                  GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
         if (!_evas_gl_texture_match(intfmt, intfmtret))
           {
-             ERR("Fail tex alloc %ix%i", w, h);
+             ERR("Fail tex alloc %ix%i, intfmt: %X  intfmtret: %X", w, h, 
intfmt, intfmtret);
              //        XXX send async err to evas
              return EINA_FALSE;
           }

-- 


Reply via email to