]> git.localhorst.tv Git - blank.git/blobdiff - src/block.cpp
save a little memory
[blank.git] / src / block.cpp
index 50c4a4ffd9040c136f6bfcdebff4704dc8fcdb33..cdfc452868ee4013298fed5d69e0fd4abef953ea 100644 (file)
@@ -6,12 +6,12 @@ namespace blank {
 const NullShape BlockType::DEFAULT_SHAPE;
 
 void BlockType::FillModel(
-       Model &model,
+       Model::Buffer &buf,
        const glm::vec3 &pos_offset,
        Model::Index idx_offset
 ) const {
-       shape->Vertices(model.vertices, model.normals, model.indices, pos_offset, idx_offset);
-       model.colors.insert(model.colors.end(), shape->VertexCount(), color);
+       shape->Vertices(buf.vertices, buf.normals, buf.indices, pos_offset, idx_offset);
+       buf.colors.insert(buf.colors.end(), shape->VertexCount(), color);
 }
 
 void BlockType::FillOutlineModel(
@@ -28,7 +28,7 @@ BlockTypeRegistry::BlockTypeRegistry() {
        Add(BlockType());
 }
 
-int BlockTypeRegistry::Add(const BlockType &t) {
+Block::Type BlockTypeRegistry::Add(const BlockType &t) {
        int id = types.size();
        types.push_back(t);
        types.back().id = id;