]> git.localhorst.tv Git - blank.git/blobdiff - src/block.cpp
simplified block face stuff
[blank.git] / src / block.cpp
index 5fc3cc0ba4369cb651da7a8884649f387d247581..6e6ac18533d7cf10173a121b4f79839b4e8c3d21 100644 (file)
@@ -102,6 +102,15 @@ void BlockType::FillModel(
        buf.colors.insert(buf.colors.end(), shape->VertexCount(), color);
 }
 
+void BlockType::FillBlockModel(
+       BlockModel::Buffer &buf,
+       const glm::mat4 &transform,
+       BlockModel::Index idx_offset
+) const {
+       shape->Vertices(buf.vertices, buf.normals, buf.indices, transform, idx_offset);
+       buf.colors.insert(buf.colors.end(), shape->VertexCount(), color);
+}
+
 void BlockType::FillOutlineModel(
        OutlineModel &model,
        const glm::vec3 &pos_offset,