X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=antikythera;a=blobdiff_plain;f=src%2Fmain.cc;fp=src%2Fmain.cc;h=7efc114e87d48bf8ecb55dcc4cff518c02da6eb7;hp=b5d430b80f996e80d9cdcb15618a6e13684a3bff;hb=84484521a697fe60f63bff077b9ba7475a45e54e;hpb=1716bebf166a5424e4a683897a78883b7733a636 diff --git a/src/main.cc b/src/main.cc index b5d430b..7efc114 100644 --- a/src/main.cc +++ b/src/main.cc @@ -7,6 +7,7 @@ #else #include #endif +#include "app.h" #include "machine.h" bool init(); @@ -19,7 +20,7 @@ void keyb(unsigned char key, int x, int y); void mouse(int bn, int st, int x, int y); void motion(int x, int y); -static float cam_dist = 2; +static float cam_dist = 0.5; static float cam_theta, cam_phi; static int prev_mx, prev_my; static bool bnstate[8]; @@ -127,7 +128,7 @@ void idle() void draw_gears() { - /* world scale is in meters, gears are in millimeters, sclae by 1/1000 */ + /* world scale is in meters, gears are in millimeters, scale by 1/1000 */ glPushMatrix(); glScalef(0.001, 0.001, 0.001); @@ -142,7 +143,7 @@ void reshape(int x, int y) glMatrixMode(GL_PROJECTION); glLoadIdentity(); - gluPerspective(50.0, (float)x / (float)y, 0.05, 100.0); + gluPerspective(50.0, (float)x / (float)y, 0.01, 100.0); } void keyb(unsigned char key, int x, int y) @@ -150,6 +151,11 @@ void keyb(unsigned char key, int x, int y) switch(key) { case 27: exit(0); + + case 'w': + opt_gear_wireframe = !opt_gear_wireframe; + glutPostRedisplay(); + break; } }