X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexarray.cpp;h=a2d3936c35f9532b3cc73087b24f9a5e19fe8a55;hb=5c59a04e253bf7868796fc0dc8e9768ad1988b33;hp=e7d7386509d6208b2b5130be5bb780f3bc757521;hpb=85facfb688035b5bbc9a3a87d080582fbf34930b;p=libs%2Fgl.git diff --git a/source/vertexarray.cpp b/source/vertexarray.cpp index e7d73865..a2d3936c 100644 --- a/source/vertexarray.cpp +++ b/source/vertexarray.cpp @@ -69,7 +69,11 @@ RefPtr 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;