double buffering
[psx_test1] / src / gpu.h
1 #ifndef GPU_H_
2 #define GPU_H_
3
4 #include <stdint.h>
5
6 /* flat vertex */
7 struct gpu_vert {
8         int16_t x, y;
9 };
10
11 /* gouraud vertex */
12 struct gpu_gvert {
13         uint32_t color;
14         int16_t x, y;
15 };
16
17
18 void gpu_reset(void);
19 void gpu_setmode(int xsz, int ysz, int bpp, int rate);
20 void gpu_display(int en);
21 void gpu_dispstart(int x, int y);
22 void gpu_cliprect(int x, int y, int w, int h);
23 void gpu_origin(int x, int y);
24
25 void gpu_fillrect(int x, int y, int w, int h, unsigned int col);
26
27 void gpu_draw_flat(int cmd, uint32_t color, struct gpu_vert *data, int vcount);
28 void gpu_draw_gouraud(int cmd, struct gpu_gvert *data, int vcount);
29
30 #endif  /* GPU_H_ */