diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-12-02 23:17:46 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-12-02 23:17:46 +0100 |
commit | 3665481649bc9e2ac34f31504a70d93aa5bd44c9 (patch) | |
tree | 6872fe1f01603d855bd0fb6a3eef662259746c7e /src/RobotRace.java | |
parent | 2f537dad16e3e222305aa2978b6a211c46345996 (diff) | |
download | 2iv60-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.java | 5 |
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); |