57
57
* In real OpenGL, PseudoColor DO NOT support texture map (as far as I know).
60
#include <X11/Intrinsic.h>
63
# define PROGCLASS "Stairs"
64
# define HACK_INIT init_stairs
65
# define HACK_DRAW draw_stairs
66
# define HACK_RESHAPE reshape_stairs
67
# define stairs_opts xlockmore_opts
68
61
# define DEFAULTS "*delay: 20000 \n" \
69
62
"*showFPS: False \n"
63
# define refresh_stairs 0
64
# define stairs_handle_event 0
70
65
# include "xlockmore.h" /* from the xscreensaver distribution */
71
66
#else /* !STANDALONE */
72
67
# include "xlock.h" /* from the xlockmore distribution */
109
103
int sphere_position;
111
105
GLXContext *glx_context;
114
static float front_shininess[] =
116
static float front_specular[] =
117
{0.7, 0.7, 0.7, 1.0};
118
static float ambient[] =
119
{0.0, 0.0, 0.0, 1.0};
120
static float diffuse[] =
121
{1.0, 1.0, 1.0, 1.0};
122
static float position0[] =
123
{1.0, 1.0, 1.0, 0.0};
124
static float position1[] =
125
{-1.0, -1.0, 1.0, 0.0};
126
static float lmodel_ambient[] =
127
{0.5, 0.5, 0.5, 1.0};
128
static float lmodel_twoside[] =
109
static const float front_shininess[] = {60.0};
110
static const float front_specular[] = {0.7, 0.7, 0.7, 1.0};
111
static const float ambient[] = {0.0, 0.0, 0.0, 1.0};
112
static const float diffuse[] = {1.0, 1.0, 1.0, 1.0};
113
static const float position0[] = {1.0, 1.0, 1.0, 0.0};
114
static const float position1[] = {-1.0, -1.0, 1.0, 0.0};
115
static const float lmodel_ambient[] = {0.5, 0.5, 0.5, 1.0};
116
static const float lmodel_twoside[] = {GL_TRUE};
132
static float MaterialRed[] =
133
{0.7, 0.0, 0.0, 1.0};
134
static float MaterialGreen[] =
135
{0.1, 0.5, 0.2, 1.0};
136
static float MaterialBlue[] =
137
{0.0, 0.0, 0.7, 1.0};
138
static float MaterialCyan[] =
139
{0.2, 0.5, 0.7, 1.0};
140
static float MaterialMagenta[] =
141
{0.6, 0.2, 0.5, 1.0};
142
static float MaterialGray[] =
143
{0.2, 0.2, 0.2, 1.0};
144
static float MaterialGray5[] =
145
{0.5, 0.5, 0.5, 1.0};
146
static float MaterialGray6[] =
147
{0.6, 0.6, 0.6, 1.0};
148
static float MaterialGray8[] =
149
{0.8, 0.8, 0.8, 1.0};
119
static const float MaterialRed[] = {0.7, 0.0, 0.0, 1.0};
120
static const float MaterialGreen[] = {0.1, 0.5, 0.2, 1.0};
121
static const float MaterialBlue[] = {0.0, 0.0, 0.7, 1.0};
122
static const float MaterialCyan[] = {0.2, 0.5, 0.7, 1.0};
123
static const float MaterialMagenta[] = {0.6, 0.2, 0.5, 1.0};
124
static const float MaterialGray[] = {0.2, 0.2, 0.2, 1.0};
125
static const float MaterialGray5[] = {0.5, 0.5, 0.5, 1.0};
126
static const float MaterialGray6[] = {0.6, 0.6, 0.6, 1.0};
127
static const float MaterialGray8[] = {0.8, 0.8, 0.8, 1.0};
152
static float MaterialYellow[] =
153
{0.7, 0.7, 0.0, 1.0};
154
static float MaterialWhite[] =
155
{0.7, 0.7, 0.7, 1.0};
130
static const float MaterialYellow[] = {0.7, 0.7, 0.0, 1.0};
131
static const float MaterialWhite[] = {0.7, 0.7, 0.7, 1.0};
157
static float positions[] =
133
static const float positions[] =
159
135
-2.5, 4.0, 0.0, /* First one is FUDGED :) */
573
553
glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sp->glx_context));
556
#endif /* !STANDALONE */
578
release_stairs(ModeInfo * mi)
559
release_stairs (ModeInfo * mi)
580
561
if (stairs != NULL) {
581
(void) free((void *) stairs);
584
if (glIsList(objects)) {
585
glDeleteLists(objects, 1);
563
for (i = 0; i < MI_NUM_SCREENS(mi); i++) {
564
stairsstruct *sp = &stairs[i];
565
if (glIsList(sp->objects)) {
566
glDeleteLists(sp->objects, 1);
575
XSCREENSAVER_MODULE ("Stairs", stairs)