summaryrefslogtreecommitdiffstats
path: root/src/RendererWorld.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RendererWorld.hpp')
-rw-r--r--src/RendererWorld.hpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/RendererWorld.hpp b/src/RendererWorld.hpp
index 2ae4e37..fb10c88 100644
--- a/src/RendererWorld.hpp
+++ b/src/RendererWorld.hpp
@@ -1,20 +1,28 @@
#pragma once
#include "RendererSection.hpp"
+#include "RendererEntity.hpp"
#include "GameState.hpp"
#include "Shader.hpp"
#include <glm/gtc/type_ptr.hpp>
class RendererWorld: public Renderer {
+ //General
GameState *gs;
- std::mutex sectionsMutex;
- std::map<Vector, RendererSection> sections;
EventListener listener;
- Shader *shader;
std::thread resourceLoader;
void LoadedSectionController();
bool isRunning = true;
+ //Blocks
+ std::mutex sectionsMutex;
+ std::map<Vector, RendererSection> sections;
+ Shader *blockShader;
+ void RenderBlocks(RenderState& renderState);
+ //Entities
+ Shader *entityShader;
+ std::vector<RendererEntity> entities;
+ void RenderEntities(RenderState& renderState);
public:
RendererWorld(GameState* ptr);
~RendererWorld();
@@ -25,4 +33,6 @@ public:
bool IsNeedResourcesPrepare() override;
double MaxRenderingDistance;
+
+ void Update();
}; \ No newline at end of file