Explorar el Código

opengles2: Fixed incorrect cliprect state.

Ryan C. Gordon hace 7 años
padre
commit
ef3d970ace
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/render/opengles2/SDL_render_gles2.c

+ 2 - 1
src/render/opengles2/SDL_render_gles2.c

@@ -969,7 +969,7 @@ SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_I
         } else {
         } else {
             data->glEnable(GL_SCISSOR_TEST);
             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) {
     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,
                         data->drawstate.target ? viewport->y + rect->y : data->drawstate.drawableh - viewport->y - rect->y - rect->h,
                         rect->w, rect->h);
                         rect->w, rect->h);
         SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
         SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
+        data->drawstate.cliprect_dirty = SDL_FALSE;
     }
     }
 
 
     if (texture != data->drawstate.texture) {
     if (texture != data->drawstate.texture) {