From f5aa7827af55342a1ec714d366944b3e3f3129b2 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 21 Jun 2017 19:26:25 +0500 Subject: 2017-06-21 --- include/graphics/RenderSection.hpp | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/graphics/RenderSection.hpp (limited to 'include/graphics/RenderSection.hpp') diff --git a/include/graphics/RenderSection.hpp b/include/graphics/RenderSection.hpp new file mode 100644 index 0000000..6a2f3ce --- /dev/null +++ b/include/graphics/RenderSection.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include +#include + +class RenderState { + GLuint ActiveVao; + GLuint ActiveShader; +public: + void SetActiveVao(GLuint Vao); + void SetActiveShader(GLuint Shader); +}; + +class RenderSection { + Vector sectionPosition; + World *world; + GLuint Vao,VboBlocks,VboModels; + + static GLuint VboVertices,VboUvs; + static std::map refCounterVbo; + static std::map refCounterVao; + + size_t numOfBlocks; + +public: + RenderSection(World *world, Vector position); + RenderSection(const RenderSection &other); + ~RenderSection(); + + void UpdateState(); + void Render(RenderState &state); + + Section* GetSection(); +}; \ No newline at end of file -- cgit v1.2.3