OpenGL+GLES renderers: Fixed incorrect clip rectangle coords (thanks, Marcel!).
authorRyan C. Gordon <icculus@icculus.org>
Mon, 28 Dec 2015 15:15:58 -0500
changeset 9977f9cd179cf50e
parent 9976 9637657107a3
child 9978 a80ea42a4adc
OpenGL+GLES renderers: Fixed incorrect clip rectangle coords (thanks, Marcel!).

Fixes Bugzilla #2700.
src/render/opengl/SDL_render_gl.c
src/render/opengles/SDL_render_gles.c
src/render/opengles2/SDL_render_gles2.c
     1.1 --- a/src/render/opengl/SDL_render_gl.c	Mon Dec 28 15:44:09 2015 -0400
     1.2 +++ b/src/render/opengl/SDL_render_gl.c	Mon Dec 28 15:15:58 2015 -0500
     1.3 @@ -1052,7 +1052,7 @@
     1.4              int w, h;
     1.5  
     1.6              SDL_GetRendererOutputSize(renderer, &w, &h);
     1.7 -            data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
     1.8 +            data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
     1.9          }
    1.10      } else {
    1.11          data->glDisable(GL_SCISSOR_TEST);
     2.1 --- a/src/render/opengles/SDL_render_gles.c	Mon Dec 28 15:44:09 2015 -0400
     2.2 +++ b/src/render/opengles/SDL_render_gles.c	Mon Dec 28 15:15:58 2015 -0500
     2.3 @@ -721,7 +721,7 @@
     2.4              int w, h;
     2.5  
     2.6              SDL_GetRendererOutputSize(renderer, &w, &h);
     2.7 -            data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
     2.8 +            data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
     2.9          }
    2.10      } else {
    2.11          data->glDisable(GL_SCISSOR_TEST);
     3.1 --- a/src/render/opengles2/SDL_render_gles2.c	Mon Dec 28 15:44:09 2015 -0400
     3.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Mon Dec 28 15:15:58 2015 -0500
     3.3 @@ -418,7 +418,7 @@
     3.4              int w, h;
     3.5  
     3.6              SDL_GetRendererOutputSize(renderer, &w, &h);
     3.7 -            data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
     3.8 +            data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
     3.9          }
    3.10      } else {
    3.11          data->glDisable(GL_SCISSOR_TEST);