mirror of https://github.com/libsdl-org/SDL
OpenGL+GLES renderers: Fixed incorrect clip rectangle coords (thanks, Marcel!).
Fixes Bugzilla #2700.
This commit is contained in:
parent
4ae69e3222
commit
f893ce3d3e
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue