From 40637ec403a729febb10a839c8d25f80467e1c33 Mon Sep 17 00:00:00 2001 From: devilhorns Date: Tue, 3 Jul 2012 07:33:44 +0000 Subject: [PATCH] Evas (gl_common): Merge Tizen changes to upstream EFL. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@73201 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/gl_common/evas_gl_shader.c | 9 +++++++++ src/modules/engines/gl_common/evas_gl_texture.c | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/modules/engines/gl_common/evas_gl_shader.c b/src/modules/engines/gl_common/evas_gl_shader.c index f587c98..ad41ecd 100644 --- a/src/modules/engines/gl_common/evas_gl_shader.c +++ b/src/modules/engines/gl_common/evas_gl_shader.c @@ -933,6 +933,15 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p, p->prog = glCreateProgram(); +#if 1 + // TODO: invalid rendering error occurs when attempting to use a + // glProgramBinary. in order to render correctly we should create a dummy + // vertex shader. + p->vert = glCreateShader(GL_VERTEX_SHADER); + glAttachShader(p->prog, p->vert); + p->frag = glCreateShader(GL_FRAGMENT_SHADER); + glAttachShader(p->prog, p->frag); +#endif glsym_glProgramBinary(p->prog, formats[0], data, length); glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex"); diff --git a/src/modules/engines/gl_common/evas_gl_texture.c b/src/modules/engines/gl_common/evas_gl_texture.c index 8162cd1..327c395 100644 --- a/src/modules/engines/gl_common/evas_gl_texture.c +++ b/src/modules/engines/gl_common/evas_gl_texture.c @@ -116,12 +116,19 @@ _tex_2d(int intfmt, int w, int h, int fmt, int type) GLERR(__FUNCTION__, __FILE__, __LINE__, ""); #ifdef GL_TEXTURE_INTERNAL_FORMAT // this is not in opengles!!! hrrrm - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, - GL_TEXTURE_INTERNAL_FORMAT, &intfmtret); - if (intfmtret != intfmt) + if (glGetTexLevelParameteriv) { - ERR("Fail tex alloc %ix%i", w, h); -// XXX send async err to evas + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, + GL_TEXTURE_INTERNAL_FORMAT, &intfmtret); + if (intfmtret != intfmt) + { + ERR("Fail tex alloc %ix%i", w, h); + // XXX send async err to evas + } + } + else + { + ERR("GL_TEXTURE_INTERNAL_FORMAT defined but no symbol loaded."); } #endif } -- 2.7.4