- separated mesh algorithms in mesh.h/mesh.c
[dosdemo] / src / mesh.h
1 #ifndef MESH_H_
2 #define MESH_H_
3
4 struct g3d_mesh {
5         int prim;
6         struct g3d_vertex *varr;
7         int16_t *iarr;
8         int vcount, icount;
9 };
10
11 int load_mesh(struct g3d_mesh *mesh, const char *fname);
12
13 void zsort_mesh(struct g3d_mesh *mesh);
14 void draw_mesh(struct g3d_mesh *mesh);
15
16 int gen_cube(struct g3d_mesh *mesh, float sz, int sub);
17 int gen_torus(struct g3d_mesh *mesh, float rad, float ringrad, int usub, int vsub);
18
19 #endif  /* MESH_H_ */