46
# define PROGCLASS "Pipes"
47
# define HACK_INIT init_pipes
48
# define HACK_DRAW draw_pipes
49
# define HACK_RESHAPE reshape_pipes
50
# define pipes_opts xlockmore_opts
51
46
# define DEFAULTS "*delay: 10000 \n" \
55
50
"*showFPS: False \n" \
56
"*fpsSolid: True \n" \
52
# define refresh_pipes 0
53
# define pipes_handle_event 0
58
54
# include "xlockmore.h" /* from the xscreensaver distribution */
59
55
#else /* !STANDALONE */
60
56
# include "xlock.h" /* from the xlockmore distribution */
166
162
extern struct lwo LWO_GuageHead, LWO_GuageFace, LWO_GuageDial, LWO_GuageConnector;
167
163
extern struct lwo LWO_ElbowBolts, LWO_ElbowCoins;
169
static float front_shininess[] =
171
static float front_specular[] =
172
{0.7, 0.7, 0.7, 1.0};
173
static float ambient0[] =
174
{0.4, 0.4, 0.4, 1.0};
175
static float diffuse0[] =
176
{1.0, 1.0, 1.0, 1.0};
177
static float ambient1[] =
178
{0.2, 0.2, 0.2, 1.0};
179
static float diffuse1[] =
180
{0.5, 0.5, 0.5, 1.0};
181
static float position0[] =
182
{1.0, 1.0, 1.0, 0.0};
183
static float position1[] =
184
{-1.0, -1.0, 1.0, 0.0};
185
static float lmodel_ambient[] =
186
{0.5, 0.5, 0.5, 1.0};
187
static float lmodel_twoside[] =
165
static const float front_shininess[] = {60.0};
166
static const float front_specular[] = {0.7, 0.7, 0.7, 1.0};
167
static const float ambient0[] = {0.4, 0.4, 0.4, 1.0};
168
static const float diffuse0[] = {1.0, 1.0, 1.0, 1.0};
169
static const float ambient1[] = {0.2, 0.2, 0.2, 1.0};
170
static const float diffuse1[] = {0.5, 0.5, 0.5, 1.0};
171
static const float position0[] = {1.0, 1.0, 1.0, 0.0};
172
static const float position1[] = {-1.0, -1.0, 1.0, 0.0};
173
static const float lmodel_ambient[] = {0.5, 0.5, 0.5, 1.0};
174
static const float lmodel_twoside[] = {GL_TRUE};
190
static float MaterialRed[] =
191
{0.7, 0.0, 0.0, 1.0};
192
static float MaterialGreen[] =
193
{0.1, 0.5, 0.2, 1.0};
194
static float MaterialBlue[] =
195
{0.0, 0.0, 0.7, 1.0};
196
static float MaterialCyan[] =
197
{0.2, 0.5, 0.7, 1.0};
198
static float MaterialYellow[] =
199
{0.7, 0.7, 0.0, 1.0};
200
static float MaterialMagenta[] =
201
{0.6, 0.2, 0.5, 1.0};
202
static float MaterialWhite[] =
203
{0.7, 0.7, 0.7, 1.0};
204
static float MaterialGray[] =
205
{0.2, 0.2, 0.2, 1.0};
176
static const float MaterialRed[] = {0.7, 0.0, 0.0, 1.0};
177
static const float MaterialGreen[] = {0.1, 0.5, 0.2, 1.0};
178
static const float MaterialBlue[] = {0.0, 0.0, 0.7, 1.0};
179
static const float MaterialCyan[] = {0.2, 0.5, 0.7, 1.0};
180
static const float MaterialYellow[] = {0.7, 0.7, 0.0, 1.0};
181
static const float MaterialMagenta[] = {0.6, 0.2, 0.5, 1.0};
182
static const float MaterialWhite[] = {0.7, 0.7, 0.7, 1.0};
183
static const float MaterialGray[] = {0.2, 0.2, 0.2, 1.0};
207
185
static pipesstruct *pipes = NULL;
501
reshape_pipes(ModeInfo * mi, int width, int height)
503
pipesstruct *pp = &pipes[MI_SCREEN(mi)];
505
glViewport(0, 0, pp->WindW = (GLint) width, pp->WindH = (GLint) height);
506
glMatrixMode(GL_PROJECTION);
508
/*glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); */
509
gluPerspective(65.0, (GLfloat) width / (GLfloat) height, 0.1, 20.0);
510
glMatrixMode(GL_MODELVIEW);
512
glClear(GL_COLOR_BUFFER_BIT);
516
479
pinit(ModeInfo * mi, int zera)
631
594
pp->nowdir = SelectNeighbor(mi);
635
init_pipes(ModeInfo * mi)
598
reshape_pipes(ModeInfo * mi, int width, int height)
600
pipesstruct *pp = &pipes[MI_SCREEN(mi)];
603
glViewport(0, 0, pp->WindW = (GLint) width, pp->WindH = (GLint) height);
604
glMatrixMode(GL_PROJECTION);
606
/*glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); */
607
gluPerspective(65.0, (GLfloat) width / (GLfloat) height, 0.1, 20.0);
608
glMatrixMode(GL_MODELVIEW);
610
glClear(GL_COLOR_BUFFER_BIT);
614
init_pipes (ModeInfo * mi)
637
616
int screen = MI_SCREEN(mi);