7 #define POLYFILL_MODE_MASK 0x03
8 #define POLYFILL_TEX_BIT 0x04
9 #define POLYFILL_ALPHA_BIT 0x08
10 #define POLYFILL_ADD_BIT 0x10
11 #define POLYFILL_ZBUF_BIT 0x20
18 POLYFILL_TEX_WIRE = 4,
22 POLYFILL_ALPHA_WIRE = 8,
24 POLYFILL_ALPHA_GOURAUD,
26 POLYFILL_ALPHA_TEX_WIRE = 12,
27 POLYFILL_ALPHA_TEX_FLAT,
28 POLYFILL_ALPHA_TEX_GOURAUD,
30 POLYFILL_ADD_WIRE = 16,
34 POLYFILL_ADD_TEX_WIRE = 20,
35 POLYFILL_ADD_TEX_FLAT,
36 POLYFILL_ADD_TEX_GOURAUD,
39 POLYFILL_WIRE_ZBUF = 32,
41 POLYFILL_GOURAUD_ZBUF,
43 POLYFILL_TEX_WIRE_ZBUF = 36,
44 POLYFILL_TEX_FLAT_ZBUF,
45 POLYFILL_TEX_GOURAUD_ZBUF,
47 POLYFILL_ALPHA_WIRE_ZBUF = 40,
48 POLYFILL_ALPHA_FLAT_ZBUF,
49 POLYFILL_ALPHA_GOURAUD_ZBUF,
51 POLYFILL_ALPHA_TEX_WIRE_ZBUF = 44,
52 POLYFILL_ALPHA_TEX_FLAT_ZBUF,
53 POLYFILL_ALPHA_TEX_GOURAUD_ZBUF,
55 POLYFILL_ADD_WIRE_ZBUF = 48,
56 POLYFILL_ADD_FLAT_ZBUF,
57 POLYFILL_ADD_GOURAUD_ZBUF,
59 POLYFILL_ADD_TEX_WIRE_ZBUF = 52,
60 POLYFILL_ADD_TEX_FLAT_ZBUF,
61 POLYFILL_ADD_TEX_GOURAUD_ZBUF
64 /* projected vertices for the rasterizer */
66 int32_t x, y; /* 24.8 fixed point */
67 int32_t u, v; /* 16.16 fixed point */
68 int32_t r, g, b, a; /* int 0-255 */
69 uint16_t z; /* 0-65535 */
77 unsigned int xmask, ymask;
80 extern struct pimage pfill_fb;
81 extern struct pimage pfill_tex;
82 extern uint16_t *pfill_zbuf;
84 void polyfill_fbheight(int height);
86 void polyfill(int mode, struct pvertex *verts, int nverts);
88 void polyfill_wire(struct pvertex *verts, int nverts);
89 void polyfill_flat(struct pvertex *verts, int nverts);
90 void polyfill_gouraud(struct pvertex *verts, int nverts);
91 void polyfill_tex_wire(struct pvertex *verts, int nverts);
92 void polyfill_tex_flat(struct pvertex *verts, int nverts);
93 void polyfill_tex_gouraud(struct pvertex *verts, int nverts);
94 void polyfill_alpha_wire(struct pvertex *verts, int nverts);
95 void polyfill_alpha_flat(struct pvertex *verts, int nverts);
96 void polyfill_alpha_gouraud(struct pvertex *verts, int nverts);
97 void polyfill_alpha_tex_wire(struct pvertex *verts, int nverts);
98 void polyfill_alpha_tex_flat(struct pvertex *verts, int nverts);
99 void polyfill_alpha_tex_gouraud(struct pvertex *verts, int nverts);
100 void polyfill_add_wire(struct pvertex *verts, int nverts);
101 void polyfill_add_flat(struct pvertex *verts, int nverts);
102 void polyfill_add_gouraud(struct pvertex *verts, int nverts);
103 void polyfill_add_tex_wire(struct pvertex *verts, int nverts);
104 void polyfill_add_tex_flat(struct pvertex *verts, int nverts);
105 void polyfill_add_tex_gouraud(struct pvertex *verts, int nverts);
106 void polyfill_flat_zbuf(struct pvertex *verts, int nverts);
107 void polyfill_gouraud_zbuf(struct pvertex *verts, int nverts);
108 void polyfill_tex_flat_zbuf(struct pvertex *verts, int nverts);
109 void polyfill_tex_gouraud_zbuf(struct pvertex *verts, int nverts);
110 void polyfill_alpha_flat_zbuf(struct pvertex *verts, int nverts);
111 void polyfill_alpha_gouraud_zbuf(struct pvertex *verts, int nverts);
112 void polyfill_alpha_tex_flat_zbuf(struct pvertex *verts, int nverts);
113 void polyfill_alpha_tex_gouraud_zbuf(struct pvertex *verts, int nverts);
114 void polyfill_add_flat_zbuf(struct pvertex *verts, int nverts);
115 void polyfill_add_gouraud_zbuf(struct pvertex *verts, int nverts);
116 void polyfill_add_tex_flat_zbuf(struct pvertex *verts, int nverts);
117 void polyfill_add_tex_gouraud_zbuf(struct pvertex *verts, int nverts);
119 #endif /* POLYFILL_H_ */