X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fextrusion-taper.c;h=e642ef142251c9729fb61d3e8746ce4e21759922;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hp=8cf51cae5ae016dc44b7a391117e08daa55d2625;hpb=c596d1306f5f92f7eab76224d3b049980a14adcb;p=xscreensaver diff --git a/hacks/glx/extrusion-taper.c b/hacks/glx/extrusion-taper.c index 8cf51cae..e642ef14 100644 --- a/hacks/glx/extrusion-taper.c +++ b/hacks/glx/extrusion-taper.c @@ -12,11 +12,19 @@ */ /* required include files */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include -#include +/*#include */ +#ifdef HAVE_GLE3 +#include +#else #include +#endif #ifndef NULL #define NULL ((void *) 0x0) @@ -47,8 +55,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) { @@ -86,11 +94,11 @@ static void init_contour (void) /* =========================================================== */ #define PSIZE 40 -double path[PSIZE][3]; -double twist[PSIZE]; -double taper[PSIZE]; +static double path[PSIZE][3]; +static double twist[PSIZE]; +static double taper[PSIZE]; -void init_taper (void) { +static void init_taper (void) { int j; double z, deltaz; double ang, dang; @@ -120,11 +128,9 @@ void init_taper (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_taper (void) { @@ -143,7 +149,7 @@ void InitStuff_taper (void) /* =========================================================== */ -void gleTaper (int ncp, +static void gleTaper (int ncp, gleDouble contour[][2], gleDouble cont_normal[][2], gleDouble up[3], @@ -209,13 +215,9 @@ void DrawStuff_taper (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 */ gleTaper (20, contour, norms, NULL, 40, path, NULL, taper, twist);