src/render/opengles2/SDL_render_gles2.c
changeset 7169 d27e9ee7310f
parent 7160 bfb5f8f4f006
child 7173 fc45e51373ea
equal deleted inserted replaced
7168:b9070b2e868a 7169:d27e9ee7310f
   286         return 0;
   286         return 0;
   287     }
   287     }
   288 
   288 
   289     if (!SDL_RectEmpty(rect)) {
   289     if (!SDL_RectEmpty(rect)) {
   290         rdata->glEnable(GL_SCISSOR_TEST);
   290         rdata->glEnable(GL_SCISSOR_TEST);
   291         rdata->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h);
   291         int lowerLeft = renderer->viewport.h - rect->y - rect->h;
       
   292         rdata->glScissor(rect->x, lowerLeft, rect->w, rect->h);
   292     } else {
   293     } else {
   293         rdata->glDisable(GL_SCISSOR_TEST);
   294         rdata->glDisable(GL_SCISSOR_TEST);
   294     }
   295     }
   295     return 0;
   296     return 0;
   296 }
   297 }