-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvao.h
More file actions
48 lines (35 loc) · 738 Bytes
/
Copy pathvao.h
File metadata and controls
48 lines (35 loc) · 738 Bytes
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
48
#ifndef VAO_H
#define VAO_H
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <glm/glm.hpp>
#include <vector>
#include <sstream>
#include <string>
#include <fstream>
#include <iostream>
#include <cstdio>
#include <cctype>
// Macro auxiliar de OpenGL
#ifndef BUFFER_OFFSET
#define BUFFER_OFFSET(i) ((const void *) (i))
#endif
class VAO
{
protected:
// Indentificadores
GLuint vao;
GLuint vbo;
// Dimensiones
GLsizei vertices;
// Construir VAO
void build (const std::vector<glm::vec3> &vertex, const std::vector<glm::vec3> &normal, const std::vector<glm::vec2> &uv);
public:
// Constructor
VAO (const std::string &path);
// Dibujar
void draw () const;
// Destructor
~VAO ();
};
#endif // VAO_H