4 #include "cgmath/cgmath.h"
36 unsigned int tex[NUM_TEX_SLOTS];
38 struct material *next;
44 int num_verts, num_idx;
45 int max_verts, max_idx;
52 unsigned int vbo, ibo;
60 int num_meshes, max_meshes;
65 int num_verts, num_idx;
66 unsigned int vbo, ibo;
70 void init_mesh(struct mesh *m);
71 void destroy_mesh(struct mesh *m);
72 void clear_mesh(struct mesh *m);
74 void init_meshgroup(struct meshgroup *mg);
75 void destroy_meshgroup(struct meshgroup *mg);
76 void clear_meshgroup(struct meshgroup *mg);
78 void calc_mesh_bounds(struct mesh *m);
80 int add_mesh_vertex(struct mesh *m, struct vertex *v);
81 int add_mesh_index(struct mesh *m, int idx);
82 int add_mesh_face(struct mesh *m, int va, int vb, int vc);
84 int add_meshgroup_mesh(struct meshgroup *mg, struct mesh *m);
86 void draw_mesh(struct mesh *m);
87 void draw_meshgroup(struct meshgroup *mg);