summaryrefslogtreecommitdiffstats
path: root/old/graphics/RenderSection.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-19 17:20:51 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-19 17:20:51 +0200
commitf24107368fa47f911f4491f644ff3755525c91e1 (patch)
tree02dc3583ed82d81139b17191af9a9bfae40c45a9 /old/graphics/RenderSection.hpp
parent2017-08-18 (diff)
downloadAltCraft-f24107368fa47f911f4491f644ff3755525c91e1.tar
AltCraft-f24107368fa47f911f4491f644ff3755525c91e1.tar.gz
AltCraft-f24107368fa47f911f4491f644ff3755525c91e1.tar.bz2
AltCraft-f24107368fa47f911f4491f644ff3755525c91e1.tar.lz
AltCraft-f24107368fa47f911f4491f644ff3755525c91e1.tar.xz
AltCraft-f24107368fa47f911f4491f644ff3755525c91e1.tar.zst
AltCraft-f24107368fa47f911f4491f644ff3755525c91e1.zip
Diffstat (limited to '')
-rw-r--r--old/graphics/RenderSection.hpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/old/graphics/RenderSection.hpp b/old/graphics/RenderSection.hpp
deleted file mode 100644
index 7f97624..0000000
--- a/old/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 "../core/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