12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef DD_MESH_H
- #define DD_MESH_H
- /* Mesh attributes */
- #define DD_MESH_POS 1
- #define DD_MESH_COL 2
- /* Generic mesh that holds all the data needed to draw a mesh
- * like colors or normals
- * vcount : number of vertices
- * ar : array of pointers to vertex data
- * attr : array of attributes
- * for each attribute, there is an array of vertex data in `ar`
- * A mesh must be initialized before it can be drawn. The only proper
- * way to do that (so far) is with "file_to_mesh()" (from "file_to_mesh.h")
- */
- struct dd_mesh {
- int vcount;
- void *ar;
- char *attr;
- };
- /* Free and Draw functions */
- void dd_mesh_free(struct dd_mesh *m);
- void dd_mesh_draw(struct dd_mesh *m);
- struct dd_mesh2 {
- int vcount;
- float *pos;
- };
- void dd_mesh2_draw(struct dd_mesh2 *m);
- #endif /* MESH_H */
|