From: devilhorns Date: Tue, 3 Jul 2012 07:33:44 +0000 (+0000) Subject: Evas (gl_common): Merge Tizen changes to upstream EFL. X-Git-Tag: submit/trunk/20120815.174732~139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95415dd13d1ae86220601a966a6d5e7393e684b4;p=profile%2Fivi%2Fevas.git Evas (gl_common): Merge Tizen changes to upstream EFL. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@73201 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- 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 }