Showing the changes to interface/src/Util.cpp (1 of 2 files). Show all
Unified · Split
| @@ -224,38 +224,53 @@ void noiseTest(int w, int h) { · 223 unmodified lines | ||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | void renderWorldBox() { |
| 227 | − // Show edge of world | |
| 227 | + // Show edge of world | |
| 228 | + float red[] = {1, 0, 0}; | |
| 229 | + float green[] = {0, 1, 0}; | |
| 230 | + float blue[] = {0, 0, 1}; | |
| 231 | + float gray[] = {0.5, 0.5, 0.5}; | |
| 232 | + | |
| 228 | 233 | glDisable(GL_LIGHTING); |
| 229 | − glColor4f(1.0, 1.0, 1.0, 1.0); | |
| 230 | 234 | glLineWidth(1.0); |
| 231 | 235 | glBegin(GL_LINES); |
| 232 | − glColor3f(1, 0, 0); | |
| 236 | + glColor3fv(red); | |
| 233 | 237 | glVertex3f(0, 0, 0); |
| 234 | 238 | glVertex3f(TREE_SCALE, 0, 0); |
| 235 | − glColor3f(0, 1, 0); | |
| 239 | + glColor3fv(green); | |
| 236 | 240 | glVertex3f(0, 0, 0); |
| 237 | 241 | glVertex3f(0, TREE_SCALE, 0); |
| 238 | − glColor3f(0, 0, 1); | |
| 242 | + glColor3fv(blue); | |
| 239 | 243 | glVertex3f(0, 0, 0); |
| 240 | 244 | glVertex3f(0, 0, TREE_SCALE); |
| 245 | + glColor3fv(gray); | |
| 246 | + glVertex3f(0, 0, TREE_SCALE); | |
| 247 | + glVertex3f(TREE_SCALE, 0, TREE_SCALE); | |
| 248 | + glVertex3f(TREE_SCALE, 0, TREE_SCALE); | |
| 249 | + glVertex3f(TREE_SCALE, 0, 0); | |
| 241 | 250 | glEnd(); |
| 242 | − // Draw little marker dots along the axis | |
| 251 | + // Draw marker dots at very end | |
| 243 | 252 | glEnable(GL_LIGHTING); |
| 244 | 253 | glPushMatrix(); |
| 245 | 254 | glTranslatef(TREE_SCALE, 0, 0); |
| 246 | − glColor3f(1, 0, 0); | |
| 255 | + glColor3fv(red); | |
| 247 | 256 | glutSolidSphere(0.125, 10, 10); |
| 248 | 257 | glPopMatrix(); |
| 249 | 258 | glPushMatrix(); |
| 250 | 259 | glTranslatef(0, TREE_SCALE, 0); |
| 251 | − glColor3f(0, 1, 0); | |
| 260 | + glColor3fv(green); | |
| 252 | 261 | glutSolidSphere(0.125, 10, 10); |
| 253 | 262 | glPopMatrix(); |
| 254 | 263 | glPushMatrix(); |
| 255 | 264 | glTranslatef(0, 0, TREE_SCALE); |
| 256 | − glColor3f(0, 0, 1); | |
| 265 | + glColor3fv(blue); | |
| 257 | 266 | glutSolidSphere(0.125, 10, 10); |
| 258 | 267 | glPopMatrix(); |
| 268 | + glPushMatrix(); | |
| 269 | + glColor3fv(gray); | |
| 270 | + glTranslatef(TREE_SCALE, 0, TREE_SCALE); | |
| 271 | + glutSolidSphere(0.125, 10, 10); | |
| 272 | + glPopMatrix(); | |
| 273 | + | |
| 259 | 274 | } |
| 260 | 275 | |
| 261 | 276 | double diffclock(timeval *clock1,timeval *clock2) |