#ifndef __buffers_h_ #define __buffers_h_ #include "GL/glut.h" #include "color.h" #include "mesh.h" #include "change.h" namespace VMI { typedef struct _VertexIL { float tx, ty; // texture coordinates GLubyte r, g, b, a; // color float x, y, z; // position coordinates } VertexIL; typedef struct _Vertex_{ float x, y, z; // position } Vertex_; extern VertexIL *saveVertexBuffer(Change *c, Vertex_ *verts, Color *cols); extern void loadVertexBuffer(VertexIL *src, Change *c, Vertex_ *verts, Color *cols); extern VertexIL *saveVertexBufferGPU(Change *c); extern void loadVertexBufferGPU(VertexIL *src, Change *c); extern VertexIL *setupInterleave(Mesh *mesh, Color *colors); extern void setupVertexArray(Mesh *mesh, Color *colors); extern void updateVertexArray(Mesh *mesh, Change *c, Vertex_ *verts, Color *cols); extern void setupVertexBufferObjects(Mesh *mesh, Color *colors); extern void updateVertexBufferObjects(Mesh *mesh, Change *c); extern void printInterleave(VertexIL *interleave, int num); extern void updateAllColorInterleave(VertexIL *interleave, int num, Color *colors); extern void updateColorInterleave(VertexIL *interleave, int num, Color *colors, int begin, int end); extern void fillColorInterleave(VertexIL *interleave, int num, int begin, int end, GLubyte color); } #endif