~ubuntu-branches/ubuntu/dapper/xscreensaver/dapper-updates

« back to all changes in this revision

Viewing changes to hacks/glx/extrusion-twistoid.c

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Hildebrandt
  • Date: 2005-04-09 00:06:43 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050409000643-z0abtifbt9s20pcc
Tags: 4.21-3
Patch by Joachim Breitner to check more frequently if DPMS kicked in (closes: #303374, #286664).

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <math.h>
20
20
#include <stdlib.h>
21
21
#include <GL/gl.h>
22
 
#include <GL/glut.h>
 
22
/*#include <GL/glut.h>*/
23
23
#ifdef HAVE_GLE3
24
24
#include <GL/gle.h>
25
25
#else
31
31
#define M_PI 3.14159265358979323846
32
32
#endif
33
33
 
 
34
/* controls shape of object */
34
35
extern float lastx;
35
36
extern float lasty;
36
 
extern float rot_x;
37
 
extern float rot_y;
38
 
extern float rot_z;
39
37
 
40
38
#define OPENGL_10
41
39
/* =========================================================== */
42
40
 
43
41
#define NUM_TOID1_PTS 5
44
 
double toid1_points[NUM_TOID1_PTS][3];
45
 
float toid1_colors [NUM_TOID1_PTS][3];
46
 
double toid1_twists [NUM_TOID1_PTS];
 
42
static double toid1_points[NUM_TOID1_PTS][3];
 
43
static float toid1_colors [NUM_TOID1_PTS][3];
 
44
static double toid1_twists [NUM_TOID1_PTS];
47
45
 
48
46
#define TSCALE (6.0)
49
47
 
66
64
   i++;                                         \
67
65
}
68
66
 
69
 
void init_toid1_line (void)
 
67
static void init_toid1_line (void)
70
68
{
71
69
   int i;
72
70
 
112
110
 
113
111
#define NUM_TWIS_PTS (20)
114
112
 
115
 
double twistation [NUM_TWIS_PTS][2];
116
 
double twist_normal [NUM_TWIS_PTS][2];
 
113
static double twistation [NUM_TWIS_PTS][2];
 
114
static double twist_normal [NUM_TWIS_PTS][2];
117
115
 
118
 
void init_tripples (void)
 
116
static void init_tripples (void)
119
117
{
120
118
   int i;
121
119
   double angle;
184
182
#ifdef OPENGL_10
185
183
   glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
186
184
 
 
185
  glFrontFace(GL_CW);  /* jwz */
 
186
 
187
187
   /* set up some matrices so that the object spins with the mouse */
188
188
   glPushMatrix ();
189
 
   glTranslatef (0.0, 0.0, -80.0);
190
 
   glRotatef(rot_x, 1, 0, 0);
191
 
   glRotatef(rot_y, 0, 1, 0);
192
 
   glRotatef(rot_z, 0, 0, 1);
193
 
/*     glRotated (43.0, 1.0, 0.0, 0.0); */
194
 
/*     glRotated (43.0, 0.0, 1.0, 0.0); */
 
189
/* glTranslatef (0.0, 0.0, -80.0); */
 
190
/* glRotated (43.0, 1.0, 0.0, 0.0); */
 
191
/* glRotated (43.0, 0.0, 1.0, 0.0); */
195
192
   glScaled (1.8, 1.8, 1.8);
196
193
   gleTwistExtrusion (NUM_TWIS_PTS, twistation, twist_normal, 
197
194
              NULL, NUM_TOID1_PTS, toid1_points, NULL, toid1_twists);