summaryrefslogtreecommitdiff
path: root/src/RobotRace.java
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-12-02 23:17:46 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-12-02 23:17:46 +0100
commit3665481649bc9e2ac34f31504a70d93aa5bd44c9 (patch)
tree6872fe1f01603d855bd0fb6a3eef662259746c7e /src/RobotRace.java
parent2f537dad16e3e222305aa2978b6a211c46345996 (diff)
download2iv60-robots-3665481649bc9e2ac34f31504a70d93aa5bd44c9.tar.gz
Improve comments
Merge two subsequent translations in draw(), add a lecture. Replace gl.glColor3f by a call that explicitly names the use of black in drawScene().
Diffstat (limited to 'src/RobotRace.java')
-rw-r--r--src/RobotRace.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/RobotRace.java b/src/RobotRace.java
index 5b8f6a7..a7fc2e7 100644
--- a/src/RobotRace.java
+++ b/src/RobotRace.java
@@ -223,7 +223,8 @@ public class RobotRace extends Base {
// Enable lighting effects
if (lightingEnabled) {
float[] lightPos = {
- // light position (slightly away from top-left corner)
+ // light position (slightly away from top-left corner of the
+ // camera (eye) point)
(float) camera.eye.x(),
(float) camera.eye.y() + 1f,
(float) camera.eye.z() - 1f,
@@ -256,7 +257,7 @@ public class RobotRace extends Base {
gl.glClear(GL_DEPTH_BUFFER_BIT);
// Set color to black.
- gl.glColor3f(0f, 0f, 0f);
+ BetterBase.setColor(Color.BLACK);
gl.glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);