OpenGL+GLES renderers: Fixed incorrect clip rectangle coords (thanks, Marcel!).

Fixes Bugzilla #2700.
This commit is contained in:
Ryan C. Gordon 2015-12-28 15:15:58 -05:00
parent 4ae69e3222
commit f893ce3d3e
3 changed files with 3 additions and 3 deletions

View File

@ -1052,7 +1052,7 @@ GL_UpdateClipRect(SDL_Renderer * renderer)
int w, h;
SDL_GetRendererOutputSize(renderer, &w, &h);
data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
}
} else {
data->glDisable(GL_SCISSOR_TEST);

View File

@ -721,7 +721,7 @@ GLES_UpdateClipRect(SDL_Renderer * renderer)
int w, h;
SDL_GetRendererOutputSize(renderer, &w, &h);
data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
}
} else {
data->glDisable(GL_SCISSOR_TEST);

View File

@ -418,7 +418,7 @@ GLES2_UpdateClipRect(SDL_Renderer * renderer)
int w, h;
SDL_GetRendererOutputSize(renderer, &w, &h);
data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
}
} else {
data->glDisable(GL_SCISSOR_TEST);