57f0dc46624887634a83baa714b7994fb118e596
[dosdemo] / src / polyfill.h
1 #ifndef POLYFILL_H_
2 #define POLYFILL_H_
3
4 #include "inttypes.h"
5
6 enum {
7         POLYFILL_WIRE,
8         POLYFILL_FLAT,
9         POLYFILL_GOURAUD,
10         POLYFILL_TEX,
11         POLYFILL_TEX_GOURAUD
12 };
13
14 /* projected vertices for the rasterizer */
15 struct pvertex {
16         int32_t x, y; /* 24.8 fixed point */
17         int32_t u, v; /* 16.16 fixed point */
18         unsigned char r, g, b;
19 };
20
21 void polyfill(int mode, struct pvertex *verts, int nverts);
22 void polyfill_wire(struct pvertex *verts, int nverts);
23
24 #endif  /* POLYFILL_H_ */