]> git.tdb.fi Git - libs/gl.git/blobdiff - source/mesh.cpp
Rewrite VertexFormat to support an arbitary amount of components
[libs/gl.git] / source / mesh.cpp
index 3a275e5b0731a3332e08fdbfb5e9e76f14be0339..7f50beb7b61bc055bb1e905529e6f91c9535c1fe 100644 (file)
@@ -13,7 +13,7 @@ namespace Msp {
 namespace GL {
 
 Mesh::Mesh():
-       vertices(NODATA)
+       vertices(VERTEX3)
 { }
 
 Mesh::Mesh(VertexFormat f):
@@ -33,6 +33,12 @@ void Mesh::add_batch(const Batch &b)
        batches.push_back(b);
 }
 
+void Mesh::clear()
+{
+       vertices.clear();
+       batches.clear();
+}
+
 void Mesh::draw() const
 {
        vertices.apply();