diff options
author | Peter Wu <lekensteyn@gmail.com> | 2014-01-09 15:23:43 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2014-01-09 15:23:43 +0100 |
commit | 6a88bc222d2805257093fc25ee8a46203ac0218a (patch) | |
tree | 0658bef9265dad6c04c9c1bd5af6ef53fcccdd48 /src/RaceTrack.java | |
parent | 9c173b3c4c458a180779002012bb3033b868ce1b (diff) | |
download | 2iv60-robots-6a88bc222d2805257093fc25ee8a46203ac0218a.tar.gz |
Allow textures to be disabled
Minor other change for consistency, even though 180 + 180 is a full
rotation, use 180 - 180 to emphasize "revert".
Diffstat (limited to 'src/RaceTrack.java')
-rw-r--r-- | src/RaceTrack.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/RaceTrack.java b/src/RaceTrack.java index 3865b3d..01a28c2 100644 --- a/src/RaceTrack.java +++ b/src/RaceTrack.java @@ -148,7 +148,9 @@ class RaceTrack extends BetterBase { Vector norm_up = Vector.Z; // Set brick texture - race.getBrickTexture().bind(gl); + if (race.enableTextures) { + race.getBrickTexture().bind(gl); + } // Draw track walls gl.glBegin(GL_QUADS); @@ -181,7 +183,9 @@ class RaceTrack extends BetterBase { glVertex(point_B); gl.glEnd(); - race.getTrackTexture().bind(gl); + if (race.enableTextures) { + race.getTrackTexture().bind(gl); + } // Draw track itself gl.glBegin(GL_QUADS); |