source: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/vmi/include/buffers.h @ 2194

Revision 2194, 1.3 KB checked in by gumbau, 17 years ago (diff)
Line 
1#ifndef __buffers_h_
2#define __buffers_h_
3
4#include "GL/glut.h"
5
6#include "color.h"
7#include "mesh.h"
8#include "change.h"
9
10namespace       VMI
11{
12
13typedef struct _VertexIL {
14    float tx, ty;       // texture coordinates
15    GLubyte r, g, b, a; // color
16    float x, y, z;      // position coordinates
17} VertexIL;
18
19typedef struct _Vertex_{
20    float x, y, z;    // position
21} Vertex_;
22
23extern VertexIL *saveVertexBuffer(Change *c, Vertex_ *verts, Color *cols);
24extern void loadVertexBuffer(VertexIL *src, Change *c, Vertex_ *verts, Color *cols);
25extern VertexIL *saveVertexBufferGPU(Change *c);
26extern void loadVertexBufferGPU(VertexIL *src, Change *c);
27
28extern VertexIL *setupInterleave(Mesh *mesh, Color *colors);
29extern void setupVertexArray(Mesh *mesh, Color *colors);
30extern void updateVertexArray(Mesh *mesh, Change *c, Vertex_ *verts, Color *cols);
31extern void setupVertexBufferObjects(Mesh *mesh, Color *colors);
32extern void updateVertexBufferObjects(Mesh *mesh, Change *c);
33extern void printInterleave(VertexIL *interleave, int num);
34extern void updateAllColorInterleave(VertexIL *interleave, int num, Color *colors);
35extern void updateColorInterleave(VertexIL *interleave, int num, Color *colors, int begin, int end);
36extern void fillColorInterleave(VertexIL *interleave, int num, int begin, int end, GLubyte color);
37
38}
39
40#endif
Note: See TracBrowser for help on using the repository browser.