]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexarray.cpp
Add Mesh and Batch classes
[libs/gl.git] / source / vertexarray.cpp
index e7d7386509d6208b2b5130be5bb780f3bc757521..a2d3936c35f9532b3cc73087b24f9a5e19fe8a55 100644 (file)
@@ -69,7 +69,11 @@ RefPtr<VertexArrayBuilder> VertexArray::modify()
 
 void VertexArray::apply() const
 {
-       if(vbuf) vbuf->bind();
+       if(format==NODATA)
+               throw InvalidState("Trying to apply a vertex apply of format NODATA");
+
+       if(vbuf)
+               vbuf->bind();
 
        const float *base=vbuf?0:&data[0];
        uint offset=0;