#pragma once #include #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, VboTextures, VboModels, VboColors; static GLuint VboVertices, VboUvs; static std::map refCounterVbo; static std::map refCounterVao; size_t numOfFaces; public: RenderSection(World *world, Vector position); RenderSection(const RenderSection &other); ~RenderSection(); void UpdateState(const std::map &textureAtlas); void Render(RenderState &state); Section *GetSection(); };