diff options
author | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-05-17 20:28:07 -0300 |
---|---|---|
committer | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-05-17 20:31:06 -0300 |
commit | 8254bbc5e3c84b8ad2f20f1ce4685146de70ef51 (patch) | |
tree | f6b77eded4e40f03bb2ec650cacc8acd8cc59085 | |
parent | d5ebe804ddea22bf182128cb2d647620c58b5b8f (diff) | |
download | efl-8254bbc5e3c84b8ad2f20f1ce4685146de70ef51.tar.gz |
evas/gl: Restore framebuffer after texture creation.
If we don't do this, the framebuffer object used on shader_array_flush()
will be wrong.
NOTE: shader_array_flush() should take care of setting the fbo
correctly.
-rw-r--r-- | src/modules/evas/engines/gl_common/evas_gl_texture.c | 4 |
1 files changed, 3 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 e34f4bca63..33cd8d50c3 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -363,6 +363,7 @@ static Evas_GL_Texture_Pool * _pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) { Evas_GL_Texture_Pool *pt; + int fnum; pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); if (!pt) return NULL; @@ -395,6 +396,7 @@ _pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, in _print_tex_count(); + glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &fnum); glGenTextures(1, &(pt->texture)); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); glBindTexture(GL_TEXTURE_2D, pt->texture); @@ -415,7 +417,7 @@ _pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, in GLERR(__FUNCTION__, __FILE__, __LINE__, ""); glsym_glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, pt->texture, 0); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); + glsym_glBindFramebuffer(GL_FRAMEBUFFER, fnum); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); |