http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver] / hacks / glx / starwars.c
index b0d4daacdab2c739b2439ade801d8a44d4e8db38..69b1cf9cd073c83569e92a2081cc5a0c95c727df 100644 (file)
@@ -1,4 +1,4 @@
-/* starwars, Copyright (c) 1998-2008 Jamie Zawinski <jwz@jwz.org> and
+/* starwars, Copyright (c) 1998-2011 Jamie Zawinski <jwz@jwz.org> and
  * Claudio Matsuoka <claudio@helllabs.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -792,6 +792,8 @@ init_sws (ModeInfo *mi)
   if ((sc->glx_context = init_GL(mi)) != NULL) {
     gl_init(mi);
     reshape_sws (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+    clear_gl_error(); /* WTF? sometimes "invalid op" from glViewport! */
+
     init_stars (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
   }