src/render/opengl/SDL_render_gl.c
changeset 7169 d27e9ee7310f
parent 7161 1619292eec30
child 7171 929700967727
--- a/src/render/opengl/SDL_render_gl.c	Sun May 12 13:25:34 2013 +0200
+++ b/src/render/opengl/SDL_render_gl.c	Sun May 12 13:40:02 2013 +0200
@@ -794,7 +794,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);
     }