From 1e47f29c8ec5386935f3e225d148f50a69f7e92d Mon Sep 17 00:00:00 2001 From: Lexxy Fox Date: Wed, 1 Nov 2023 12:52:41 -0500 Subject: [PATCH] changed gear colours --- glxgears.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glxgears.c b/glxgears.c index e71da16..8ca74bf 100644 --- a/glxgears.c +++ b/glxgears.c @@ -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();