-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVAO.h
44 lines (33 loc) · 766 Bytes
/
VAO.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
#ifndef VAO_CLASS_H
#define VAO_CLASS_H
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <glm/gtx/vector_angle.hpp>
#include <glad/glad.h>
#include "VBO.h"
#define GLM_SWIZZLE
enum block_T
{
BLOCK_DIRT,
};
class VAO
{
public:
// ID reference for the Vertex Array Object
GLuint ID;
block_T blockType;
glm::vec3 position;
// Constructor that generates a VAO ID
VAO();
// Links a VBO Attribute such as a position or color to the VAO
void LinkAttrib(VBO &VBO, GLuint layout, GLuint numComponents, GLenum type, GLsizeiptr stride, void* offset);
// Binds the VAO
void Bind();
// Unbinds the VAO
void Unbind();
// Deletes the VAO
void Delete();
};
#endif