-
Notifications
You must be signed in to change notification settings - Fork 8
/
vbo.h
47 lines (36 loc) · 761 Bytes
/
vbo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* vbo.h
* lorenz
*
* Created by McK on 10/02/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
// Location/Normals
#define X_POS 0
#define Y_POS 1
#define Z_POS 2
// Texture Coordinates
#define U_POS 0
#define V_POS 1
// Colours
#define R_POS 0
#define G_POS 1
#define B_POS 2
#define A_POS 3
// A helper macro to get a position
#define BUFFER_OFFSET(i) ((char *)(i))
// Vertex structure
typedef struct
{
GLfloat position[3];
//GLfloat tex[2];
//GLfloat normal[3];
GLfloat colour[4];
// GLubyte padding[1]; // Total: 28 ?
} Vertex;
void createVBO(int size);
void updateVBO(Vertex *verts, int numvers);
void destroyVBO();
void drawVBO(int start, int numvers, int line);
void drawVBOComponents(int start, int numvers);