Fixed setting the orthographic projection when the viewport changes.
authorSam Lantinga <slouken@libsdl.org>
Sat, 28 Jan 2012 14:05:48 -0500
changeset 6268 3aa24ec6bc39
parent 6267 ed2cf4669e55
child 6269 07e08cb58696
Fixed setting the orthographic projection when the viewport changes.
src/render/opengles2/SDL_render_gles2.c
--- a/src/render/opengles2/SDL_render_gles2.c	Wed Jan 25 14:29:56 2012 +0000
+++ b/src/render/opengles2/SDL_render_gles2.c	Sat Jan 28 14:05:48 2012 -0500
@@ -266,6 +266,10 @@
 
     rdata->glViewport(renderer->viewport.x, renderer->viewport.y,
                renderer->viewport.w, renderer->viewport.h);
+
+    if (rdata->current_program) {
+        GLES2_SetOrthographicProjection(renderer);
+    }
     return 0;
 }
 
@@ -555,9 +559,6 @@
             return -1;
         }
     }
-    if (data->current_program) {
-        GLES2_SetOrthographicProjection(renderer);
-    }
     return 0;
 }