]> git.localhorst.tv Git - blank.git/blobdiff - src/block.hpp
use indices for model rendering
[blank.git] / src / block.hpp
index 0f567c4b5fdf3400b5209ed64c76766a00f4fb88..1c1dddb10c3e4377f6e5d1b6617be38eedf00674 100644 (file)
@@ -32,29 +32,17 @@ struct BlockType {
        static const NullShape DEFAULT_SHAPE;
 
 
-       void FillVBO(
-               const glm::vec3 &pos,
-               std::vector<glm::vec3> &vertices,
-               std::vector<glm::vec3> &colors,
-               std::vector<glm::vec3> &normals
+       void FillModel(
+               Model &m,
+               const glm::vec3 &pos_offset = { 0, 0, 0 },
+               Model::Index idx_offset = 0
        ) const;
-
-       void FillModel(const glm::vec3 &pos, Model &m) const {
-               FillVBO(pos, m.vertices, m.colors, m.normals);
-               m.Invalidate();
-       }
-
-
-       void FillOutlineVBO(
-               std::vector<glm::vec3> &vertices,
-               std::vector<glm::vec3> &colors
+       void FillOutlineModel(
+               OutlineModel &m,
+               const glm::vec3 &pos_offset = { 0, 0, 0 },
+               OutlineModel::Index idx_offset = 0
        ) const;
 
-       void FillOutlineModel(OutlineModel &m) const {
-               FillOutlineVBO(m.vertices, m.colors);
-               m.Invalidate();
-       }
-
 };