/* $Id$
This file is part of gldbg
-Copyright © 2009 Mikko Rasa, Mikkosoft Productions
+Copyright © 2009-2010 Mikko Rasa, Mikkosoft Productions
Distributed under the GPL
*/
#define BUFFERSTATE_H_
#include <string>
+#include <vector>
#include <GL/gl.h>
+struct ArrayState;
+
+struct BufferContent
+{
+ struct Array
+ {
+ GLenum kind;
+ unsigned index;
+ unsigned size;
+ GLenum type;
+ int offset;
+
+ Array(const ArrayState &);
+ };
+
+ bool consistent;
+ unsigned stride;
+ std::vector<Array> arrays;
+
+ BufferContent();
+ void update(const ArrayState &);
+ std::string describe() const;
+};
+
struct BufferState
{
unsigned id;
+ GLenum target;
GLenum usage;
unsigned size;
char *data;
+ BufferContent content;
BufferState();
void set_data(unsigned, const void *, GLenum);