ftp://ftp.linux.ncsu.edu/mirror/ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os...
[xscreensaver] / hacks / glx / b_lockglue.c
index 7af0d628dd325bc4528ea6d02f5abba529a73f1a..c85e3500d810c83ad8348122e019cc8e448c9cde 100644 (file)
@@ -1,6 +1,5 @@
-#if !defined( lint ) && !defined( SABER )
+#if 0
 static const char sccsid[] = "@(#)b_lockglue.c  4.11 98/06/16 xlockmore";
-
 #endif
 
 /*-
@@ -21,16 +20,16 @@ struct glb_config glb_config =
        3,                      /* subdivision_depth */
 #endif
        5,                      /* nr_nudge_axes */
-       0.3,                    /* nudge_angle_factor */
-       0.15,                   /* nudge_factor */
+       0.01,                   /* nudge_angle_factor */
+       0.20,                   /* nudge_factor */
        0.1,                    /* rotation_factor */
        8,                      /* create_bubbles_every */
        8,                      /* max_bubbles */
        {0.7, 0.8, 0.9, 1.0},   /* p_bubble_group */
        0.5,                    /* max_size */
        0.1,                    /* min_size */
-       0.1,                    /* max_speed */
-       0.03,                   /* min_speed */
+       0.03,                   /* max_speed */
+       0.005,                  /* min_speed */
        1.5,                    /* scale_factor */
        -4,                     /* screen_bottom */
        4,                      /* screen_top */
@@ -49,9 +48,13 @@ struct glb_config glb_config =
 #ifdef STANDALONE
 #define PROGCLASS "Bubble3D"
 #define HACK_INIT init_bubble3d
+#define HACK_RESHAPE reshape_bubble3d
 #define HACK_DRAW draw_bubble3d
 #define bubble3d_opts xlockmore_opts
-# define DEFAULTS ""
+
+# define DEFAULTS      "*delay:        10000   \n"     \
+                       "*showFPS:      False   \n"
+
 #include "xlockmore.h"
 #else
 #include "xlock.h"
@@ -95,8 +98,8 @@ init(struct context *c)
        c->draw_context = glb_draw_init();
 }
 
-static void
-reshape(int w, int h)
+void
+reshape_bubble3d(ModeInfo *mi, int w, int h)
 {
        glViewport(0, 0, (GLsizei) w, (GLsizei) h);
        glMatrixMode(GL_PROJECTION);
@@ -131,7 +134,7 @@ init_bubble3d(ModeInfo * mi)
        c->glx_context = init_GL(mi);
        if (c->glx_context != 0) {
                init(c);
-               reshape(MI_WIDTH(mi), MI_HEIGHT(mi));
+               reshape_bubble3d(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                do_display(c);
                glFinish();
                glXSwapBuffers(display, window);
@@ -155,6 +158,7 @@ draw_bubble3d(ModeInfo * mi)
 
        do_display(c);
 
+        if (mi->fps_p) do_fps (mi);
        glFinish();
        glXSwapBuffers(display, window);
 }