summaryrefslogtreecommitdiffstats
path: root/include/graphics/RenderSection.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-07-24 16:52:24 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-07-24 16:52:24 +0200
commit6a00886804c53883d919f008f6ec47a574d86607 (patch)
tree2dbe9fdb0a0d5f068770d49a3c960d36958f27d5 /include/graphics/RenderSection.hpp
parent2017-07-21 (diff)
downloadAltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.gz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.bz2
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.lz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.xz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.zst
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.zip
Diffstat (limited to 'include/graphics/RenderSection.hpp')
-rw-r--r--include/graphics/RenderSection.hpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/include/graphics/RenderSection.hpp b/include/graphics/RenderSection.hpp
deleted file mode 100644
index 58c4acf..0000000
--- a/include/graphics/RenderSection.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#pragma once
-
-#include <GL/glew.h>
-#include <glm/detail/type_mat.hpp>
-#include <glm/vec2.hpp>
-#include <glm/detail/type_mat4x4.hpp>
-#include <glm/gtx/transform.hpp>
-#include <easylogging++.h>
-
-#include <AssetManager.hpp>
-#include <world/Section.hpp>
-#include <world/World.hpp>
-
-class RenderState {
- GLuint ActiveVao;
- GLuint ActiveShader;
-public:
- void SetActiveVao(GLuint Vao);
- void SetActiveShader(GLuint Shader);
-};
-
-class RenderSection {
- Vector sectionPosition;
- World *world;
- GLuint Vao, VboTextures, VboModels, VboColors;
- std::vector<glm::mat4> models;
- std::vector<glm::vec4> textures;
- std::vector<glm::vec3> colors;
-
- static GLuint VboVertices, VboUvs;
- static std::map<GLuint, int> refCounterVbo;
- static std::map<GLuint, int> refCounterVao;
-
- size_t numOfFaces = 0;
-
- bool isEnabled = true;
-
- size_t hash = 0;
-public:
- RenderSection(World *world, Vector position);
- RenderSection(const RenderSection &other);
- ~RenderSection();
-
- void UpdateState(const std::map<BlockTextureId, glm::vec4> &textureAtlas);
- void Render(RenderState &state);
-
- void SetEnabled(bool isEnabled);
-
- Section *GetSection();
-
- bool IsNeedUpdate();
-}; \ No newline at end of file