summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaoul Hecky <raoul.hecky@gmail.com>2014-06-17 22:15:21 +0200
committerRaoul Hecky <raoul.hecky@gmail.com>2014-06-17 22:19:26 +0200
commitb1c9ef04cea949d6cdbc30217e40bea08473ae91 (patch)
tree949b0c548396c0bf142ed781188d3a2407e1d62d
parent77c54f7a60a1f78d82f018177a13d007ab072cb9 (diff)
downloadefl-devs/raoul/macos_port.tar.gz
evas_gl: add more matching formats to make cocoa_gl happydevs/raoul/macos_port
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c5
1 files changed, 4 insertions, 1 deletions
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 224b7dccad..2740c8fa40 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;
}