From http://www.jwz.org/xscreensaver/xscreensaver-5.16.tar.gz
[xscreensaver] / hacks / glx / boing.c
index 1c95d1ead8c269a244ca622049cabbe28ec0134a..979907210a19beacc86b0ad42d38e4c578ba1326 100644 (file)
@@ -109,6 +109,8 @@ static XrmOptionDescRec opts[] = {
   { "-ball-color2",".ballColor2",XrmoptionSepArg, 0 },
   { "-grid-color", ".gridColor", XrmoptionSepArg, 0 },
   { "-shadow-color",".shadowColor",XrmoptionSepArg, 0 },
+  { "-background",  ".boingBackground",XrmoptionSepArg, 0 },
+  { "-bg",          ".boingBackground",XrmoptionSepArg, 0 },
 };
 
 static argtype vars[] = {
@@ -376,7 +378,7 @@ draw_scanlines (ModeInfo *mi)
       int lh, ls;
       int y;
       glLoadIdentity();
-      gluOrtho2D (0, w, 0, h);
+      glOrtho (0, w, 0, h, -1, 1);
 
       if      (h > 500) lh = 4, ls = 4;
       else if (h > 300) lh = 2, ls = 1;
@@ -628,6 +630,7 @@ draw_boing (ModeInfo *mi)
 
   glPushMatrix ();
   gltrackball_rotate (bp->trackball);
+  glRotatef(current_device_rotation(), 0, 0, 1);
 
   glLightfv (GL_LIGHT0, GL_POSITION, bp->lightpos);