ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-5.01.tar.gz
[xscreensaver] / hacks / glx / pipes.c
index 3defa33f343981a6fcdc8b91ec5d653df78e4432..e47361eaaaf8a1e0fffdacbd1fe3ee4ec8049e4a 100644 (file)
@@ -475,21 +475,6 @@ MakeShape(ModeInfo * mi, int newdir)
        }
 }
 
-ENTRYPOINT void
-reshape_pipes(ModeInfo * mi, int width, int height)
-{
-       pipesstruct *pp = &pipes[MI_SCREEN(mi)];
-
-       glViewport(0, 0, pp->WindW = (GLint) width, pp->WindH = (GLint) height);
-       glMatrixMode(GL_PROJECTION);
-       glLoadIdentity();
-       /*glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); */
-       gluPerspective(65.0, (GLfloat) width / (GLfloat) height, 0.1, 20.0);
-       glMatrixMode(GL_MODELVIEW);
-
-  glClear(GL_COLOR_BUFFER_BIT);
-}
-
 static void
 pinit(ModeInfo * mi, int zera)
 {
@@ -609,6 +594,22 @@ pinit(ModeInfo * mi, int zera)
        pp->nowdir = SelectNeighbor(mi);
 }
 
+ENTRYPOINT void
+reshape_pipes(ModeInfo * mi, int width, int height)
+{
+       pipesstruct *pp = &pipes[MI_SCREEN(mi)];
+    pinit(mi, 1);
+
+       glViewport(0, 0, pp->WindW = (GLint) width, pp->WindH = (GLint) height);
+       glMatrixMode(GL_PROJECTION);
+       glLoadIdentity();
+       /*glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); */
+       gluPerspective(65.0, (GLfloat) width / (GLfloat) height, 0.1, 20.0);
+       glMatrixMode(GL_MODELVIEW);
+
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
 ENTRYPOINT void
 init_pipes (ModeInfo * mi)
 {