]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexarray.cpp
Windows compatibility:
[libs/gl.git] / source / vertexarray.cpp
index e7d7386509d6208b2b5130be5bb780f3bc757521..6da0f9c0d44812ad6294d769200af558d5532bf0 100644 (file)
@@ -5,7 +5,7 @@ Copyright © 2007  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <GL/gl.h>
+#include "gl.h"
 #include "vertexarray.h"
 #include "vertexbuffer.h"
 
@@ -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;