src/render/opengles/SDL_render_gles.c
changeset 7169 d27e9ee7310f
parent 7160 bfb5f8f4f006
child 7173 fc45e51373ea
equal deleted inserted replaced
7168:b9070b2e868a 7169:d27e9ee7310f
   643         return 0;
   643         return 0;
   644     }
   644     }
   645 
   645 
   646     if (!SDL_RectEmpty(rect)) {
   646     if (!SDL_RectEmpty(rect)) {
   647         data->glEnable(GL_SCISSOR_TEST);
   647         data->glEnable(GL_SCISSOR_TEST);
   648         data->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h);
   648         int lowerLeft = renderer->viewport.h - rect->y - rect->h;
       
   649         data->glScissor(rect->x, lowerLeft, rect->w, rect->h);
   649     } else {
   650     } else {
   650         data->glDisable(GL_SCISSOR_TEST);
   651         data->glDisable(GL_SCISSOR_TEST);
   651     }
   652     }
   652     return 0;
   653     return 0;
   653 }
   654 }