]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/arraystate.cpp
Move the profiler and inspector tools to the gl flavor
[gldbg.git] / flavors / gl / source / arraystate.cpp
diff --git a/flavors/gl/source/arraystate.cpp b/flavors/gl/source/arraystate.cpp
new file mode 100644 (file)
index 0000000..37db75a
--- /dev/null
@@ -0,0 +1,34 @@
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2010  Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#include "arraystate.h"
+#include "bufferstate.h"
+
+ArrayState::ArrayState():
+       kind(0),
+       index(0),
+       enabled(false),
+       size(4),
+       type(GL_FLOAT),
+       normalized(false),
+       stride(0),
+       buffer(0),
+       pointer(0)
+{ }
+
+void ArrayState::set(unsigned s, GLenum t, bool n, unsigned r, BufferState *b, long p)
+{
+       size = s;
+       type = t;
+       stride = r;
+       normalized = n;
+       buffer = b;
+       pointer = p;
+
+       if(buffer)
+               buffer->content.update(*this);
+}