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;
16 extern float sball_matrix[16];
18 int demo_init(int argc, char **argv);
19 void demo_cleanup(void);
23 void demo_keyboard(int key, int press);
26 /* defined in main_*.c */
28 unsigned long get_msec(void);
29 void set_palette(int idx, int r, int g, int b);
31 /* pass 0 to just swap vmem_back/vmem_front with page flipping
32 * pass a pointer to a system-ram pixel buffer to copy it to vmem_front,
33 * instead of flipping.
35 void swap_buffers(void *pixels);
37 /* call each frame to get 3D viewing spherical coordinates */
38 void mouse_orbit_update(float *theta, float *phi, float *dist);