summaryrefslogtreecommitdiffstats
path: root/src/RendererSectionData.hpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-28 17:55:59 +0200
committerLaG1924 <lag1924@gmail.com>2021-06-28 17:55:59 +0200
commit7ff7b88cf66131a559ea0ee931bddce4785507a7 (patch)
tree11e2ff67d8e4ca2a7ba25c0ce70f2056e47eb723 /src/RendererSectionData.hpp
parentEmbed UV to vertex data (diff)
downloadAltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.tar
AltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.tar.gz
AltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.tar.bz2
AltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.tar.lz
AltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.tar.xz
AltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.tar.zst
AltCraft-7ff7b88cf66131a559ea0ee931bddce4785507a7.zip
Diffstat (limited to 'src/RendererSectionData.hpp')
-rw-r--r--src/RendererSectionData.hpp16
1 files changed, 10 insertions, 6 deletions
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<glm::vec4> positions; //4 per instance
- std::vector<glm::vec2> uvs; //4 per instance
- std::vector<float> uvLayers;
- std::vector<glm::vec2> animations;
- std::vector<glm::vec3> colors;
- std::vector<glm::vec2> lights;
+ std::vector<VertexData> vertices;
size_t hash = 0;
Vector sectionPos;
bool forced = false;