From 7ff7b88cf66131a559ea0ee931bddce4785507a7 Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Mon, 28 Jun 2021 20:55:59 +0500 Subject: Implemented vertex data iterleaving --- src/RendererSectionData.hpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/RendererSectionData.hpp') diff --git a/src/RendererSectionData.hpp b/src/RendererSectionData.hpp index 7b30e44..e2fd190 100644 --- a/src/RendererSectionData.hpp +++ b/src/RendererSectionData.hpp @@ -30,13 +30,17 @@ struct SectionsData { BlockLightness GetSkyLight(const Vector &pos) const; }; +struct VertexData { + glm::vec4 positions[4]; + glm::vec2 uvs[4]; + float uvLayers; + glm::vec2 animations; + glm::vec3 colors; + glm::vec2 lights; +}; + struct RendererSectionData { - std::vector positions; //4 per instance - std::vector uvs; //4 per instance - std::vector uvLayers; - std::vector animations; - std::vector colors; - std::vector lights; + std::vector vertices; size_t hash = 0; Vector sectionPos; bool forced = false; -- cgit v1.2.3