Distributed under the LGPL
*/
-#include <GL/gl.h>
+#include "gl.h"
#include "vertexarray.h"
#include "vertexbuffer.h"
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;