X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fblock.cpp;h=6e6ac18533d7cf10173a121b4f79839b4e8c3d21;hb=c899292fd5dee11bee0fafadf051f4204eb4bf2a;hp=5fc3cc0ba4369cb651da7a8884649f387d247581;hpb=3072e2cd49ad1614100d1a1c73afe6a4888fb875;p=blank.git diff --git a/src/block.cpp b/src/block.cpp index 5fc3cc0..6e6ac18 100644 --- a/src/block.cpp +++ b/src/block.cpp @@ -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,