# define PROGCLASS "Pipes"
# define HACK_INIT init_pipes
# define HACK_DRAW draw_pipes
# define PROGCLASS "Pipes"
# define HACK_INIT init_pipes
# define HACK_DRAW draw_pipes
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
#ifdef USE_MODULES
ModStruct pipes_description =
{"pipes", "init_pipes", "draw_pipes", "release_pipes",
#ifdef USE_MODULES
ModStruct pipes_description =
{"pipes", "init_pipes", "draw_pipes", "release_pipes",
"change_pipes", NULL, &pipes_opts,
1000, 2, 5, 500, 4, 1.0, "",
"Shows a selfbuilding pipe system", 0, NULL};
"change_pipes", NULL, &pipes_opts,
1000, 2, 5, 500, 4, 1.0, "",
"Shows a selfbuilding pipe system", 0, NULL};
/*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);
/*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);
- reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
- pp->initial_rotation = -10.0;
+ reshape_pipes(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+ if (rotatepipes)
+ pp->initial_rotation = NRAND(180); /* jwz */
+ else
+ pp->initial_rotation = -10.0;
glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0);
/* Finish the system with another sphere */
mySphere(0.6);
glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0);
/* Finish the system with another sphere */
mySphere(0.6);
-#if defined( MESA ) && defined( SLOW )
- pp->flip = !pp->flip;
- if (pp->flip)
- glXSwapBuffers(display, window);
-#endif
+ glXSwapBuffers(display, window);
+
+ if (mi->fps_p) do_fps (mi);