X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=inline;f=src%2Fmesh.h;fp=src%2Fmesh.h;h=92cc240d57aa63becedf075b9ab9205622236ad3;hb=8cee0ffb00cce3d81487f1161286ac299db7d044;hp=0000000000000000000000000000000000000000;hpb=9ed338a5e703fc819cede5cb797e82e08046ac17;p=dosdemo diff --git a/src/mesh.h b/src/mesh.h new file mode 100644 index 0000000..92cc240 --- /dev/null +++ b/src/mesh.h @@ -0,0 +1,19 @@ +#ifndef MESH_H_ +#define MESH_H_ + +struct g3d_mesh { + int prim; + struct g3d_vertex *varr; + int16_t *iarr; + int vcount, icount; +}; + +int load_mesh(struct g3d_mesh *mesh, const char *fname); + +void zsort_mesh(struct g3d_mesh *mesh); +void draw_mesh(struct g3d_mesh *mesh); + +int gen_cube(struct g3d_mesh *mesh, float sz, int sub); +int gen_torus(struct g3d_mesh *mesh, float rad, float ringrad, int usub, int vsub); + +#endif /* MESH_H_ */