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;
59 /* doesn't own the meshes */
61 int num_meshes, max_meshes;
66 int num_verts, num_idx;
67 unsigned int vbo, ibo;
71 void init_mesh(struct mesh *m);
72 void destroy_mesh(struct mesh *m);
73 void clear_mesh(struct mesh *m);
74 int copy_mesh(struct mesh *dest, struct mesh *src);
76 void init_meshgroup(struct meshgroup *mg);
77 void destroy_meshgroup(struct meshgroup *mg);
78 void clear_meshgroup(struct meshgroup *mg);
80 void calc_mesh_bounds(struct mesh *m);
82 int add_mesh_vertex(struct mesh *m, struct vertex *v);
83 int add_mesh_index(struct mesh *m, int idx);
84 int add_mesh_face(struct mesh *m, int va, int vb, int vc);
86 int add_meshgroup_mesh(struct meshgroup *mg, struct mesh *m);
88 void draw_mesh(struct mesh *m);
89 void draw_meshgroup(struct meshgroup *mg);
91 void xform_mesh(struct mesh *mesh, float *mat);