-
Notifications
You must be signed in to change notification settings - Fork 3
/
BufferManager.hpp
48 lines (38 loc) · 1.02 KB
/
BufferManager.hpp
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
#pragma once
#include "VAO.hpp"
#include "VBO.hpp"
#include "EBO.hpp"
#include "ShaderManager.hpp"
#include "ChunkManager.hpp"
#include "TextureArray.hpp"
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <glm/gtc/type_ptr.hpp>
#include <glm/glm.hpp>
class BufferManager
{
public:
Shader cubeShaderProgram{"shaders/cube.vert", "shaders/cube.frag"};
VAO LightVAO;
VBO LightVBO;
EBO LightEBO;
Shader lightShaderProgram{"shaders/lighting.vert", "shaders/lighting.frag"};
// Our textures
TextureArray textureArray;
// Our chunk manager
ChunkManager chunkManager;
// Singleton Design
static BufferManager &Instance()
{
static BufferManager instance;
return instance;
}
// Constructor that generates a Vertex Array Object
BufferManager();
// Destructor
~BufferManager();
// Run the event loop once
void RunLoop(GLFWwindow *window, glm::vec3 cameraPosition, glm::vec3 cameraOrientation);
// Activate textures
void ActivateTextures();
};