From 6bab0ab86a72881c3e0b88284c211e01fb22435a Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 20 Sep 2017 20:54:09 +0500 Subject: 2017-09-20 --- src/RendererSection.hpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'src/RendererSection.hpp') 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 indices; - std::vector vertices; - std::vector uv; std::vector models; std::vector textures; std::vector colors; @@ -29,25 +26,19 @@ private: bool TestBlockExists(const std::vector §ionsList, World *world, Vector blockPos); void AddFacesByBlockModel(const std::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 -- cgit v1.2.3