http://slackware.bholcomb.com/slackware/slackware-11.0/source/xap/xscreensaver/xscree...
[xscreensaver] / hacks / glx / extrusion-screw.c
index 112eaca7217ec0f3f65a30ff92c770138ffae736..6724476d8c0817b62e84e8a33a68a26f1e3d9497 100644 (file)
  *
  */
 
-/* required include files */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <math.h>
+#include "extrusion.h"
 #include <stdlib.h>
-#include <GL/gl.h>
-#include <GL/glut.h>
-#ifdef HAVE_GLE3
-#include <GL/gle.h>
-#else
-#include <GL/tube.h>
-#endif
-
-#ifndef NULL
-#define NULL ((void *) 0x0)
-#endif /* NULL */
+#include <math.h>
 
 /* =========================================================== */
 
@@ -50,8 +35,8 @@
 
 #define NUM_PTS (25)
 
-double contour [NUM_PTS][2];
-double norms [NUM_PTS][2];
+static double contour [NUM_PTS][2];
+static double norms [NUM_PTS][2];
 
 static void init_contour (void)
 {
@@ -88,11 +73,9 @@ static void init_contour (void)
    
 /* =========================================================== */
 
+/* controls shape of object */
 extern float lastx;
 extern float lasty;
-extern float rot_x;
-extern float rot_y;
-extern float rot_z;
 
 void InitStuff_screw (void)
 {
@@ -117,12 +100,9 @@ void DrawStuff_screw (void) {
 
    /* set up some matrices so that the object spins with the mouse */
    glPushMatrix ();
-   glTranslatef (0.0, 0.0, -80.0);
-   glRotatef(rot_x, 1, 0, 0);
-   glRotatef(rot_y, 0, 1, 0);
-   glRotatef(rot_z, 0, 0, 1);
-/*     glRotatef (130.0, 0.0, 1.0, 0.0); */
-/*     glRotatef (65.0, 1.0, 0.0, 0.0); */
+   /* glTranslatef (0.0, 0.0, -80.0); */
+   /* glRotatef (130.0, 0.0, 1.0, 0.0); */
+   /* glRotatef (65.0, 1.0, 0.0, 0.0); */
 
    /* draw the brand and the handle */
    gleScrew (20, contour, norms,