X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexarray.cpp;h=6da0f9c0d44812ad6294d769200af558d5532bf0;hb=a4ec5410595ddf37bfbc0e85ad87d31a9cbf94f1;hp=e7d7386509d6208b2b5130be5bb780f3bc757521;hpb=85facfb688035b5bbc9a3a87d080582fbf34930b;p=libs%2Fgl.git diff --git a/source/vertexarray.cpp b/source/vertexarray.cpp index e7d73865..6da0f9c0 100644 --- a/source/vertexarray.cpp +++ b/source/vertexarray.cpp @@ -5,7 +5,7 @@ Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#include +#include "gl.h" #include "vertexarray.h" #include "vertexbuffer.h" @@ -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;