Commit ef3d970acee2d7b32af01219e2923f9aa469b1f8

Ryan C. Gordon 2018-10-04T20:22:28

opengles2: Fixed incorrect cliprect state.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index 1acc25e..929e376 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -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) {
@@ -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) {