Skip to content

Commit

Permalink
opengles2: Fixed incorrect cliprect state.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 5, 2018
1 parent 208c4b0 commit ef3d970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/render/opengles2/SDL_render_gles2.c
Expand Up @@ -969,7 +969,7 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I
} else {
data->glEnable(GL_SCISSOR_TEST);
}
data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
data->drawstate.cliprect_enabled_dirty = SDL_FALSE;
}

if (data->drawstate.cliprect_enabled && data->drawstate.cliprect_dirty) {
Expand All @@ -979,6 +979,7 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I
data->drawstate.target ? viewport->y + rect->y : data->drawstate.drawableh - viewport->y - rect->y - rect->h,
rect->w, rect->h);
SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
data->drawstate.cliprect_dirty = SDL_FALSE;
}

if (texture != data->drawstate.texture) {
Expand Down

0 comments on commit ef3d970

Please sign in to comment.