diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-16 17:11:07 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-16 17:11:07 +0200 |
commit | dee50239be8fff566b3ca687bc70900b391a8164 (patch) | |
tree | 6ff6ae2e8e2ea5109d031be8c588f4b8f38f68eb /src/RendererWorld.hpp | |
parent | 2017-08-12 (diff) | |
download | AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.gz AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.bz2 AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.lz AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.xz AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.zst AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.zip |
Diffstat (limited to '')
-rw-r--r-- | src/RendererWorld.hpp | 16 |
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 |