From c3f37b9d5908918628cc895f64fbd66cf674c062 Mon Sep 17 00:00:00 2001 From: raster Date: Fri, 13 Nov 2009 08:19:13 +0000 Subject: [PATCH] and now complex stuff works..... woot! git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@43656 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/gl_common/evas_gl_context.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/modules/engines/gl_common/evas_gl_context.c b/src/modules/engines/gl_common/evas_gl_context.c index 5fe6961..fb14f5a 100644 --- a/src/modules/engines/gl_common/evas_gl_context.c +++ b/src/modules/engines/gl_common/evas_gl_context.c @@ -80,10 +80,11 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc) h = gc->shader.surface->h; m = -1; } - + if ((!gc->change.size) || - ((gc->shared->w == w) && (gc->shared->h == gc->h))) + ((gc->shared->w == w) && (gc->shared->h == h))) return; + gc->shared->w = w; gc->shared->h = h; gc->change.size = 0; @@ -91,10 +92,8 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc) glViewport(0, 0, w, h); matrix_ident(proj); - if (m == 1) - matrix_ortho(proj, 0, w, 0, h, -1.0, 1.0); - else - matrix_ortho(proj, 0, w, h, 0, -1.0, 1.0); + if (m == 1) matrix_ortho(proj, 0, w, 0, h, -1.0, 1.0); + else matrix_ortho(proj, 0, w, h, 0, -1.0, 1.0); glUseProgram(gc->shared->shader.rect.prog); glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.rect.prog, "mvp"), 1, @@ -307,13 +306,9 @@ evas_gl_common_context_target_surface_set(Evas_GL_Context *gc, // FIXME: viewport goopies gc->change.size = 1; if (gc->shader.surface == gc->def_surface) - { - glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); - } + glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); else - { - glBindFramebuffer(GL_FRAMEBUFFER_EXT, surface->tex->pt->fb); - } + glBindFramebuffer(GL_FRAMEBUFFER_EXT, surface->tex->pt->fb); _evas_gl_common_viewport_set(gc); #endif } -- 2.7.4