diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-10-06 03:12:48 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-10-06 03:12:48 -0400 |
commit | 1a909087ddfdfe3b947c65b07287a08a40f119ce (patch) | |
tree | 64df54d9634731b6fc1a60e8ec6d42afab5b608a /src/render.hpp | |
parent | a62d96ad0521b064e6ef61a6f80888e27966502b (diff) |
World is now saved as image files instead of generations
Diffstat (limited to 'src/render.hpp')
-rw-r--r-- | src/render.hpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/render.hpp b/src/render.hpp index c4456cf..45fb548 100644 --- a/src/render.hpp +++ b/src/render.hpp @@ -37,8 +37,8 @@ #include "shader.hpp" #include "world.hpp" #include "components/Player.hpp" + #include "events/render.hpp" -#include "events/world.hpp" #include <map> @@ -52,6 +52,16 @@ struct UIRenderData tex(_tex), normal(_normal), vertex(_vertex) {} }; +struct WorldRenderData +{ + GLuint tex; + GLuint normal; + unsigned int vertex; + + WorldRenderData(GLuint _tex, GLuint _normal, unsigned int _vertex) : + tex(_tex), normal(_normal), vertex(_vertex) {} +}; + class RenderSystem : public entityx::System<RenderSystem>, public entityx::Receiver<RenderSystem> { @@ -69,11 +79,8 @@ private: // Map of VBOs and their render data std::map<GLuint, UIRenderData> uiRenders; + std::map<GLuint, WorldRenderData> worldRenders; - GLuint worldVBO = 0; - unsigned int worldVertex = 0; - GLuint worldTexture = 0; - GLuint worldNormal = 0; entityx::Entity player; // Save the player so we can track the camera public: RenderSystem() : |