X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fextrusion-joinoffset.c;h=89a60e2cdf90107dbc9a0d6b3f5eb3ec42532243;hb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;hp=786d0c755c8e878a62fdada6b42f8f1eeef2af54;hpb=c596d1306f5f92f7eab76224d3b049980a14adcb;p=xscreensaver diff --git a/hacks/glx/extrusion-joinoffset.c b/hacks/glx/extrusion-joinoffset.c index 786d0c75..89a60e2c 100644 --- a/hacks/glx/extrusion-joinoffset.c +++ b/hacks/glx/extrusion-joinoffset.c @@ -2,17 +2,14 @@ /* cylinder drawing demo */ /* this demo demonstrates the various join styles */ -/* required include files */ -#include -#include -#include +#include "extrusion.h" /* ------------------------------------------------------- */ /* the arrays in which we will store the polyline */ #define NPTS 100 -double points [NPTS][3]; -float colors [NPTS][3]; +static double points [NPTS][3]; +static float colors [NPTS][3]; static int idx = 0; /* some utilities for filling that array */ @@ -32,8 +29,8 @@ static int idx = 0; /* the arrays in which we will store the contour */ #define NCONTOUR 100 -double contour_points [NCONTOUR][2]; -int cidx = 0; +static double contour_points [NCONTOUR][2]; +static int cidx = 0; /* some utilities for filling that array */ #define C_PNT(x,y) { \ @@ -91,8 +88,9 @@ void InitStuff_joinoffset (void) gleSetJoinStyle (TUBE_JN_ANGLE | TUBE_CONTOUR_CLOSED | TUBE_JN_CAP); } -double up_vector[3] = {1.0, 0.0, 0.0}; +static double up_vector[3] = {1.0, 0.0, 0.0}; +/* controls shape of object */ extern float lastx; extern float lasty; @@ -114,8 +112,10 @@ void DrawStuff_joinoffset (void) /* set up some matrices so that the object spins with the mouse */ glPushMatrix (); - glTranslatef (0.0, 4.0, -80.0); - glRotatef (0.5*lastx, 0.0, 1.0, 0.0); + glScalef (0.5, 0.5, 0.5); + glTranslatef (0, 4, 0); + /* glTranslatef (0.0, 4.0, -80.0); */ + /* glRotatef (0.5*lastx, 0.0, 1.0, 0.0); */ gleExtrusion (cidx, moved_contour, contour_points, up_vector, idx, points, colors); @@ -126,8 +126,10 @@ void DrawStuff_joinoffset (void) /* draw a seond copy, this time with the raw style, to compare * things against */ glPushMatrix (); - glTranslatef (0.0, -4.0, -80.0); - glRotatef (0.5*lastx, 0.0, 1.0, 0.0); + glScalef (0.5, 0.5, 0.5); + glTranslatef (0, -4, 0); + /* glTranslatef (0.0, -4.0, -80.0); */ + /* glRotatef (0.5*lastx, 0.0, 1.0, 0.0); */ save_style = gleGetJoinStyle (); style = save_style;