+/* Construct stars (number of stars is dependent on size of screen) */
+static void
+init_stars (ModeInfo *mi, int width, int height)
+{
+ sws_configuration *sc = &scs[MI_SCREEN(mi)];
+ int i, j;
+ int nstars = width * height / 320;
+ int max_size = 3;
+ GLfloat inc = 0.5;
+ int steps = max_size / inc;
+
+ glDeleteLists (sc->star_list, 1);
+ sc->star_list = glGenLists (1);
+ glNewList (sc->star_list, GL_COMPILE);
+
+ glEnable(GL_POINT_SMOOTH);
+
+ for (j = 1; j <= steps; j++)
+ {
+ glPointSize(inc * j);
+ glBegin (GL_POINTS);
+ for (i = 0; i < nstars / steps; i++)
+ {
+ glColor3f (0.6 + frand(0.3),
+ 0.6 + frand(0.3),
+ 0.6 + frand(0.3));
+ glVertex2f (2 * width * (0.5 - frand(1.0)),
+ 2 * height * (0.5 - frand(1.0)));
+ }
+ glEnd ();
+ }
+ glEndList ();
+}
+
+