mirror of https://github.com/encounter/SDL.git
gl/gles/gles2 render: fix SDL_RenderClear being affected by the clip rect in some situations.
This commit is contained in:
parent
ce3b16fc9e
commit
0c26373842
|
@ -1166,9 +1166,9 @@ GL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
|
||||||
data->drawstate.clear_color = color;
|
data->drawstate.clear_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->drawstate.cliprect_enabled) {
|
if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) {
|
||||||
data->glDisable(GL_SCISSOR_TEST);
|
data->glDisable(GL_SCISSOR_TEST);
|
||||||
data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
|
data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->glClear(GL_COLOR_BUFFER_BIT);
|
data->glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
|
@ -866,9 +866,9 @@ GLES_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vert
|
||||||
data->drawstate.clear_color = color;
|
data->drawstate.clear_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->drawstate.cliprect_enabled) {
|
if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) {
|
||||||
data->glDisable(GL_SCISSOR_TEST);
|
data->glDisable(GL_SCISSOR_TEST);
|
||||||
data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
|
data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->glClear(GL_COLOR_BUFFER_BIT);
|
data->glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
|
@ -1277,9 +1277,9 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
|
||||||
data->drawstate.clear_color = color;
|
data->drawstate.clear_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->drawstate.cliprect_enabled) {
|
if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) {
|
||||||
data->glDisable(GL_SCISSOR_TEST);
|
data->glDisable(GL_SCISSOR_TEST);
|
||||||
data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
|
data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->glClear(GL_COLOR_BUFFER_BIT);
|
data->glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
Loading…
Reference in New Issue