X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel%2FBlockModel.hpp;fp=src%2Fmodel%2FBlockModel.hpp;h=2ffd816f913831f3fd46acdc86346e7b8ec811fe;hb=7bb75960dbf9bfdee9ac865384aca81791b3da5c;hp=0d93758ce766ead4201be2e9b1f83c514c3d1763;hpb=a34fbcb0581056bd464158acfa30289a3e2c2c2d;p=blank.git diff --git a/src/model/BlockModel.hpp b/src/model/BlockModel.hpp index 0d93758..2ffd816 100644 --- a/src/model/BlockModel.hpp +++ b/src/model/BlockModel.hpp @@ -14,17 +14,20 @@ class BlockModel { public: using Position = glm::vec3; + using TexCoord = glm::vec3; using Color = glm::vec3; using Light = float; using Index = unsigned int; using Positions = std::vector; + using TexCoords = std::vector; using Colors = std::vector; using Lights = std::vector; using Indices = std::vector; enum Attribute { ATTRIB_VERTEX, + ATTRIB_TEXCOORD, ATTRIB_COLOR, ATTRIB_LIGHT, ATTRIB_INDEX, @@ -34,12 +37,14 @@ public: struct Buffer { Positions vertices; + TexCoords tex_coords; Colors colors; Lights lights; Indices indices; void Clear() noexcept { vertices.clear(); + tex_coords.clear(); colors.clear(); lights.clear(); indices.clear(); @@ -47,6 +52,7 @@ public: void Reserve(size_t p, size_t i) { vertices.reserve(p); + tex_coords.reserve(p); colors.reserve(p); lights.reserve(p); indices.reserve(i);