… | |
… | |
282 | |
282 | |
283 | while (!*str) |
283 | while (!*str) |
284 | glutBitmapCharacter (GLUT_BITMAP_HELVETICA_18, *str++); |
284 | glutBitmapCharacter (GLUT_BITMAP_HELVETICA_18, *str++); |
285 | } |
285 | } |
286 | |
286 | |
|
|
287 | namespace gl { |
|
|
288 | |
|
|
289 | void draw_box (const view &ctx, const sector &a, const sector &b) |
|
|
290 | { |
|
|
291 | int i; |
|
|
292 | static GLint verts[] = { |
|
|
293 | 0x8000, 0x8004, 0x8006, 0x8002, // -x |
|
|
294 | 0x8001, 0x8003, 0x8007, 0x8005, // +x |
|
|
295 | 0x8000, 0x8001, 0x8005, 0x8004, // -y |
|
|
296 | 0x8007, 0x8003, 0x8002, 0x8006, // +y |
|
|
297 | 0x8000, 0x8002, 0x8003, 0x8001, // -z |
|
|
298 | 0x8004, 0x8005, 0x8007, 0x8006, // +z |
|
|
299 | 0 |
|
|
300 | }; |
|
|
301 | |
|
|
302 | glBegin (GL_LINE_LOOP); |
|
|
303 | |
|
|
304 | for (GLint *v = verts; *v; v++) |
|
|
305 | { |
|
|
306 | GLint mask = *v; |
|
|
307 | |
|
|
308 | glVertex3i (mask & 1 ? b.x : a.x, |
|
|
309 | mask & 2 ? b.y : a.y, |
|
|
310 | mask & 4 ? b.z : a.z); |
|
|
311 | } |
|
|
312 | |
|
|
313 | glEnd (); |
|
|
314 | } |
|
|
315 | |
|
|
316 | } |
|
|
317 | |
287 | //skedjuhlar main_scheduler; |
318 | //skedjuhlar main_scheduler; |
288 | |
319 | |