6 static void destroy(void);
7 static void start(void);
8 static void stop(void);
9 static void draw(long tm);
10 static void mbutton(int bn, int st, int x, int y);
11 static void mmotion(int x, int y);
13 static float cam_theta, cam_phi, cam_dist = 8;
15 static int bnstate[8];
16 static int mouse_x, mouse_y;
18 static struct demo_part part = {
29 void reg_whitted(void)
40 static void destroy(void)
44 static void start(void)
48 static void stop(void)
52 static void draw(long tm)
54 glMatrixMode(GL_MODELVIEW);
56 glTranslatef(0, 0, -cam_dist);
57 glRotatef(cam_phi, 1, 0, 0);
58 glRotatef(cam_theta, 0, 1, 0);
60 glEnable(GL_LIGHTING);
68 static void mbutton(int bn, int st, int x, int y)
75 static void mmotion(int x, int y)
82 if(!(dx | dy)) return;
85 cam_theta += dx * 0.5;
87 if(cam_phi < -90) cam_phi = -90;
88 if(cam_phi > 90) cam_phi = 90;
92 if(cam_dist < 0) cam_dist = 0;