src/render/opengles/SDL_render_gles.c
changeset 7169 d27e9ee7310f
parent 7160 bfb5f8f4f006
child 7173 fc45e51373ea
--- a/src/render/opengles/SDL_render_gles.c	Sun May 12 13:25:34 2013 +0200
+++ b/src/render/opengles/SDL_render_gles.c	Sun May 12 13:40:02 2013 +0200
@@ -645,7 +645,8 @@
 
     if (!SDL_RectEmpty(rect)) {
         data->glEnable(GL_SCISSOR_TEST);
-        data->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h);
+        int lowerLeft = renderer->viewport.h - rect->y - rect->h;
+        data->glScissor(rect->x, lowerLeft, rect->w, rect->h);
     } else {
         data->glDisable(GL_SCISSOR_TEST);
     }