-
Notifications
You must be signed in to change notification settings - Fork 1
/
Model.h
51 lines (44 loc) · 1.24 KB
/
Model.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
48
49
50
51
#ifndef MODEL_H
#define MODEL_H
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <GLFW/glfw3.h>
#include "Texture.h"
class Model {
public:
Model() {}
Model(const char* file);
Model(std::vector<unsigned short> indices,
std::vector<glm::vec3> vertices,
std::vector<glm::vec2> uvs,
std::vector<glm::vec3> normals,
std::vector<glm::vec3> tangents,
std::vector<glm::vec3> bitangents);
glm::vec3 rotation, scaling, position;
glm::mat4 getMatr();
void render();
Texture* diffuseTexture = 0;
Texture* normalTexture = 0;
Texture* specularTexture = 0;
Texture* ssaoTexture = 0;
glm::vec3 max;
glm::vec3 min;
private:
void createFromBuffer(std::vector<unsigned short> indices,
std::vector<glm::vec3> vertices,
std::vector<glm::vec2> uvs,
std::vector<glm::vec3> normals,
std::vector<glm::vec3> tangents,
std::vector<glm::vec3> bitangents);
GLuint indexBuffer;
GLuint vertexBuffer;
GLuint normalBuffer;
GLuint uvBuffer;
GLuint tangentBuffer;
GLuint bitangentBuffer;
GLuint VertexArrayID;
int indicesCount;
glm::mat4 sum = glm::mat4(1.0f);
};
#endif