src/render/opengl/SDL_render_gl.c
changeset 7486 c074c0b23916
parent 7420 fe82b639c4d6
child 7502 6ff02ff3cf06
--- a/src/render/opengl/SDL_render_gl.c	Sat Jul 20 20:12:36 2013 -0400
+++ b/src/render/opengl/SDL_render_gl.c	Sat Jul 20 21:10:05 2013 -0400
@@ -277,7 +277,6 @@
 {
     GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
 
-    GL_ClearErrors(renderer);
     if (SDL_CurrentContext != data->context) {
         if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) {
             return -1;
@@ -286,6 +285,9 @@
 
         GL_UpdateViewport(renderer);
     }
+
+    GL_ClearErrors(renderer);
+
     return 0;
 }