6 extern int fb_width, fb_height, fb_bpp;
7 extern uint16_t *fb_pixels; /* system-RAM pixel buffer: use swap_buffers(fb_pixels) */
8 /* video memory pointers. might both point to the front buffer if there is not
9 * enough memory for page flipping. use swap_buffers(0) to flip. */
10 extern uint16_t *vmem_back, *vmem_front;
12 extern unsigned long time_msec;
13 extern int mouse_x, mouse_y;
14 extern unsigned int mouse_bmask;
22 extern float sball_matrix[16];
24 int demo_init(int argc, char **argv);
25 void demo_cleanup(void);
29 void demo_keyboard(int key, int press);
32 /* defined in main_*.c */
34 unsigned long get_msec(void);
35 void set_palette(int idx, int r, int g, int b);
37 /* pass 0 to just swap vmem_back/vmem_front with page flipping
38 * pass a pointer to a system-ram pixel buffer to copy it to vmem_front,
39 * instead of flipping.
41 void swap_buffers(void *pixels);
43 /* call each frame to get 3D viewing spherical coordinates */
44 void mouse_orbit_update(float *theta, float *phi, float *dist);
46 void draw_mouse_pointer(uint16_t *fb);