rayzor

view src/m3dimpl.h @ 5:5fcf72837b69

fixed the dosemu bit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 06 Apr 2014 02:43:24 +0300
parents 9035507275d6
children a68dbf80d547
line source
1 #ifndef M3DIMPL_H_
2 #define M3DIMPL_H_
4 #include "min3d.h"
6 #define MSTACK_SIZE 16
8 struct min3d_mstack {
9 float m[MSTACK_SIZE][16];
10 int top;
11 };
13 struct min3d_vertex {
14 float pos[4];
15 float color[4];
16 float normal[4];
17 float tex[2];
18 };
20 struct min3d_context {
21 struct m3d_image *cbuf;
22 uint16_t *zbuf;
24 unsigned long state;
26 int mmode; /* matrix mode */
27 struct min3d_mstack mstack[2];
29 const float *vert_array;
30 const float *norm_array;
31 const float *col_array;
32 const float *tc_array;
34 /* immediate mode state */
35 float cur_color[4];
36 float cur_normal[3];
37 float cur_texcoord[2];
38 };
40 extern struct min3d_context *m3dctx;
42 void draw_point(struct min3d_vertex *v);
43 void draw_line(struct min3d_vertex *v);
44 void draw_poly(struct min3d_vertex *v, int numv);
46 #endif /* M3DIMPL_H_ */