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

Revision 2127, 1.3 KB checked in by gumbau, 17 years ago (diff)
Line 
1#ifndef __interleave_h_
2#define __interleave_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 GLuint vertex_buf, color_buf;
24
25extern Vertex_ *buf_vertices;
26extern Color   *buf_colors;
27
28extern Vertex_ *pbuf_vertices;
29extern Color   *pbuf_colors;
30
31extern void saveVertexBuffer(Change *c, VertexIL *dest);
32extern void loadVertexBuffer(VertexIL *src, Change *c);
33
34extern VertexIL *setupInterleave(Mesh *mesh, Color *colors);
35extern void setupVertexArray(Mesh *mesh, Color *colors);
36extern void updateVertexArray(Mesh *mesh, Change *c);
37extern void setupVertexBufferObjects(Mesh *mesh, Color *colors);
38extern void updateVertexBufferObjects(Mesh *mesh, Change *c);
39extern void printInterleave(VertexIL *interleave, int num);
40extern void updateAllColorInterleave(VertexIL *interleave, int num, Color *colors);
41extern void updateColorInterleave(VertexIL *interleave, int num, Color *colors, int begin, int end);
42extern void fillColorInterleave(VertexIL *interleave, int num, int begin, int end, GLubyte color);
43
44}
45
46#endif
Note: See TracBrowser for help on using the repository browser.