diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-09-20 17:54:09 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:32 +0100 |
commit | 6bab0ab86a72881c3e0b88284c211e01fb22435a (patch) | |
tree | 3594305ad612f0e59ee630c2b5a59d974fc8bac5 /src/RendererSection.hpp | |
parent | 2017-09-19 (diff) | |
download | AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.tar AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.tar.gz AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.tar.bz2 AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.tar.lz AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.tar.xz AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.tar.zst AltCraft-6bab0ab86a72881c3e0b88284c211e01fb22435a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/RendererSection.hpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/RendererSection.hpp b/src/RendererSection.hpp index de042f2..fa4a389 100644 --- a/src/RendererSection.hpp +++ b/src/RendererSection.hpp @@ -14,9 +14,6 @@ #include "Renderer.hpp" struct RendererSectionData { - std::vector<GLuint> indices; - std::vector<glm::vec3> vertices; - std::vector<glm::vec2> uv; std::vector<glm::mat4> models; std::vector<glm::vec4> textures; std::vector<glm::vec3> colors; @@ -29,25 +26,19 @@ private: bool TestBlockExists(const std::vector<Vector> §ionsList, World *world, Vector blockPos); void AddFacesByBlockModel(const std::vector<Vector> §ionsList, World *world, Vector blockPos, const BlockModel &model, glm::mat4 transform, unsigned char light, unsigned char skyLight); - - void CreateVertices(); - - void ReplaceVertices(); }; class RendererSection { enum Vbos { - //VERTICES = 0, - IBO = 0, - UV, + MODELS = 0, TEXTURES, COLORS, LIGHTS, VBOCOUNT, }; - GLuint Vao = { 0 }; - GLuint Vbo[VBOCOUNT] = { 0 }; - + + static GLuint Vao; + static GLuint Vbo[VBOCOUNT]; static GLuint VboVertices, VboUvs; size_t hash; @@ -61,13 +52,15 @@ public: ~RendererSection(); - void Render(RenderState &renderState); - Vector GetPosition(); size_t GetHash(); size_t numOfFaces; + size_t offset; + + static GLuint GetVao(); + friend void swap(RendererSection &lhs, RendererSection &rhs); };
\ No newline at end of file |