nuclear@12: #include nuclear@12: #include "mesh.h" nuclear@12: #include "x3d.h" nuclear@12: nuclear@12: void init_mesh(struct mesh *m) nuclear@12: { nuclear@12: m->prim = X3D_TRIANGLES; nuclear@12: m->verts = 0; nuclear@12: m->nverts = 0; nuclear@12: } nuclear@12: nuclear@12: void destroy_mesh(struct mesh *m) nuclear@12: { nuclear@12: free(m->verts); nuclear@12: } nuclear@12: nuclear@12: void draw_mesh(struct mesh *m) nuclear@12: { nuclear@12: x3d_vertex_array(m->nverts, m->verts); nuclear@12: x3d_draw(m->prim, m->nverts); nuclear@12: x3d_vertex_array(0, 0); nuclear@12: }