summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/RobotRace.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/RobotRace.java b/src/RobotRace.java
index 9dfda81..308d5de 100644
--- a/src/RobotRace.java
+++ b/src/RobotRace.java
@@ -167,24 +167,22 @@ public class RobotRace extends Base {
private void initLighting() {
// greyish color
float[] ambientRGBA = {0.2f, 0.2f, 0.2f, 1.0f};
- // yellowish - "sunglow" RGB (255, 204, 51)
- //float[] diffuseRGBA = {1.0f, 0.8f, 0.2f, 1.0f};
- // red!
+ // red! the color of the blood!
float[] diffuseRGBA = {1.0f, 0.0f, 0.0f, 1.0f};
// set the light-source colors
gl.glLightfv(GL_LIGHT0, GL_AMBIENT, ambientRGBA, 0);
gl.glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseRGBA, 0);
- // global ambient light
- //gl.glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientRGBA, 0);
-
// turn the light on (note: display func must set or unset LIGHTING)
gl.glEnable(GL_LIGHT0);
//gl.glEnable(GL_LIGHTING);
// blend the light with the material colors
gl.glEnable(GL_COLOR_MATERIAL);
+
+ // necessary because normals are improperly scaled
+ gl.glEnable(GL_NORMALIZE);
}
/**