extern int fb_width, fb_height, fb_bpp;
extern uint16_t *fb_pixels; /* system-RAM pixel buffer: use swap_buffers(fb_pixels) */
-/* video memory pointers. might both point to the front buffer if there is not
- * enough memory for page flipping. use swap_buffers(0) to flip. */
-extern uint16_t *vmem_back, *vmem_front;
+extern uint16_t *vmem; /* visible video memory pointer */
extern unsigned long time_msec;
extern int mouse_x, mouse_y;
extern unsigned int mouse_bmask;
enum {
- MOUSE_LEFT = 1,
- MOUSE_RIGHT = 2,
- MOUSE_MIDDLE = 4
+ MOUSE_BN_LEFT = 1,
+ MOUSE_BN_RIGHT = 2,
+ MOUSE_BN_MIDDLE = 4
};
extern float sball_matrix[16];
unsigned long get_msec(void);
void set_palette(int idx, int r, int g, int b);
-/* pass 0 to just swap vmem_back/vmem_front with page flipping
- * pass a pointer to a system-ram pixel buffer to copy it to vmem_front,
- * instead of flipping.
- */
+/* if pixels is 0, it defaults to fb_pixels */
void swap_buffers(void *pixels);
/* call each frame to get 3D viewing spherical coordinates */
void mouse_orbit_update(float *theta, float *phi, float *dist);
+void draw_mouse_pointer(uint16_t *fb);
+
#endif /* DEMO_H_ */