From d47a81ce170414eb2f8d68e7c7e5086eee9366fe Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 4 May 2013 11:43:02 +0900 Subject: [PATCH] last scissor always scissor stuff broke map. fix it to work again accounting for fbo's and master clip. --- .../evas/engines/gl_common/evas_gl_context.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index d16ce90778..414da57ff7 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -2742,13 +2742,14 @@ shader_array_flush(Evas_Engine_GL_Context *gc) ch = gc->master_clip.h; } } - if ((gc->pipe[i].shader.clip) || (gc->master_clip.enabled)) + if ((gc->pipe[i].shader.clip) || + ((gc->master_clip.enabled) && (!fbo))) { glEnable(GL_SCISSOR_TEST); if (!fbo) - scissor_rot(gc, gc->rot, gw, gh, cx, gh - cy - ch, cw, ch); + scissor_rot(gc, gc->rot, gw, gh, cx, gh - cy - ch, cw, ch); else - glScissor(cx, cy, cw, ch); + glScissor(cx, cy, cw, ch); setclip = 1; gc->state.current.cx = cx; gc->state.current.cy = cy; @@ -2766,7 +2767,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc) } } if (((gc->pipe[i].shader.clip) && (!setclip)) || - (gc->master_clip.enabled)) + ((gc->master_clip.enabled) && (!fbo))) { int cx, cy, cw, ch; @@ -2796,9 +2797,9 @@ shader_array_flush(Evas_Engine_GL_Context *gc) (ch != gc->state.current.ch)) { if (!fbo) - scissor_rot(gc, gc->rot, gw, gh, cx, gh - cy - ch, cw, ch); + scissor_rot(gc, gc->rot, gw, gh, cx, gh - cy - ch, cw, ch); else - glScissor(cx, cy, cw, ch); + glScissor(cx, cy, cw, ch); gc->state.current.cx = cx; gc->state.current.cy = cy; gc->state.current.cw = cw;