changed gear colours

This commit is contained in:
Lexxy Fox 2023-11-01 12:52:41 -05:00
parent e3a48c7aba
commit 1e47f29c8e

View File

@ -310,7 +310,7 @@ static void reshape(int width, int height) {
}
static void init(int argc, char *argv[]) {
glLightfv(GL_LIGHT0, GL_POSITION, (GLfloat[]){5.0, 5.0, 10.0, 0.0});
glLightfv(GL_LIGHT0, GL_POSITION, (const GLfloat[]){5.0, 5.0, 10.0, 0.0});
glEnable(GL_CULL_FACE);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
@ -320,23 +320,23 @@ static void init(int argc, char *argv[]) {
gear1 = glGenLists(1);
glNewList(gear1, GL_COMPILE);
glMaterialfv(
GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (GLfloat[]){0.8, 0.1, 0.0, 1.0}
GL_FRONT, GL_AMBIENT_AND_DIFFUSE,
(const GLfloat[]){245.0 / 255, 169.0 / 255, 184.0 / 255, 1}
);
gear(1.0, 4.0, 1.0, 20, 0.7);
glEndList();
gear2 = glGenLists(1);
glNewList(gear2, GL_COMPILE);
glMaterialfv(
GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (GLfloat[]){0.0, 0.8, 0.2, 1.0}
);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (const GLfloat[]){1, 1, 1, 1});
gear(0.5, 2.0, 2.0, 10, 0.7);
glEndList();
gear3 = glGenLists(1);
glNewList(gear3, GL_COMPILE);
glMaterialfv(
GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (GLfloat[]){0.2, 0.2, 1.0, 1.0}
GL_FRONT, GL_AMBIENT_AND_DIFFUSE,
(const GLfloat[]){91.0 / 255, 206.0 / 255, 250.0 / 255, 1}
);
gear(1.3, 2.0, 0.5, 10, 0.7);
glEndList();