]> git.tdb.fi Git - gldbg.git/blobdiff - source/bufferstate.h
Add classes to track OpenGL state and commands to inspect it
[gldbg.git] / source / bufferstate.h
diff --git a/source/bufferstate.h b/source/bufferstate.h
new file mode 100644 (file)
index 0000000..17462c6
--- /dev/null
@@ -0,0 +1,27 @@
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2009  Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#ifndef BUFFERSTATE_H_
+#define BUFFERSTATE_H_
+
+#include <string>
+#include <GL/gl.h>
+
+struct BufferState
+{
+       unsigned id;
+       GLenum usage;
+       unsigned size;
+       char *data;
+
+       BufferState();
+       void set_data(unsigned, const void *, GLenum);
+       void set_sub_data(unsigned, unsigned, const void *);
+       std::string describe() const;
+};
+
+#endif