summaryrefslogtreecommitdiffstats
path: root/include/Core.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/Core.hpp (renamed from src/core/Core.hpp)40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/core/Core.hpp b/include/Core.hpp
index 4cc334c..64fab4e 100644
--- a/src/core/Core.hpp
+++ b/include/Core.hpp
@@ -1,16 +1,19 @@
#pragma once
+#include <iomanip>
+#include <tuple>
+
#include <easylogging++.h>
#include <SFML/Window.hpp>
#include <GL/glew.h>
-#include <iomanip>
-#include <tuple>
#include <glm/gtc/type_ptr.hpp>
-#include "../gamestate/GameState.hpp"
-#include "../network/NetworkClient.hpp"
-#include "../gui/Gui.hpp"
-#include "../graphics/Shader.hpp"
-#include "AssetManager.hpp"
+
+#include <GameState.hpp>
+#include <AssetManager.hpp>
+#include <graphics/Shader.hpp>
+#include <graphics/Gui.hpp>
+#include <graphics/RenderSection.hpp>
+#include <network/NetworkClient.hpp>
class Core {
GameState *gameState;
@@ -31,8 +34,6 @@ class Core {
void RenderWorld();
- void RenderGui(Gui &Target);
-
void HandleMouseCapture();
void HandleEvents();
@@ -43,7 +44,7 @@ class Core {
void SetMouseCapture(bool IsCaptured);
- void PrepareToWorldRendering();
+ void PrepareToRendering();
void RenderFrame();
@@ -57,19 +58,22 @@ class Core {
std::thread gameStateLoopThread;
- Shader *shader,*shader2;
- //Cube verticies, Cube VAO, Cube UVs, TextureIndexes UBO, TextureData UBO, TextureData2 UBO, Blocks VBO, Models VBO, Line VAO, Lines VBO
- GLuint VBO, VAO, VBO2, UBO, UBO2, VBO3, VBO4, VAO2, VBO5;
+ Shader *shader;
+ //Cube verticies, Cube VAO, Cube UVs, TextureIndexes UboTextureIndexes, TextureData UboTextureIndexes, TextureData2 UboTextureIndexes, Blocks VBO, Models VBO, Line VAO, Lines VBO
+ //GLuint VBO, VAO, VBO2, UboTextureIndexes, UboTextureData, VBO3, VBO4, VAO2, VBO5;
+ GLuint UboTextureIndexes, UboTextureData;
+ //std::vector<Vector> toRender;
std::vector<Vector> toRender;
- std::vector<Vector> optimizedRender;
+ std::map<Vector, RenderSection> availableChunks;
int ChunkDistance = 2;
- std::map<Vector, std::vector<glm::mat4>> toRenderModels;
- std::map<Vector, std::vector<glm::vec2>> toRenderBlocks;
- //std::map<Vector, std::tuple<std::vector<glm::mat4>, std::vector<glm::vec2> > > sectionsRenderingData;
+ RenderState renderState;
+
+ /*std::map<Vector, std::vector<glm::mat4>> toRenderModels;
+ std::map<Vector, std::vector<glm::vec2>> toRenderBlocks;*/
- double tickRate=0;
+ double tickRate = 0;
public:
Core();