]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/bufferstate.h
Fix several problems reported by valgrind
[gldbg.git] / flavors / gl / source / bufferstate.h
index bf0e1ec1050b9eb77bb396323537b8e3ef0eae3d..6cff3feaf55d2f8f20d85cbd1211c9cbd27d3926 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 #include <vector>
+#include "autoconstptr.h"
 #include "opengl.h"
 
 struct ArrayState;
@@ -26,6 +27,7 @@ struct BufferContent
        std::vector<Array> arrays;
 
        BufferContent();
+
        void update(const ArrayState &);
        void update_elements(GLenum);
        std::string describe() const;
@@ -41,9 +43,20 @@ struct BufferState
        BufferContent content;
 
        BufferState();
+       ~BufferState();
+
        void set_data(unsigned, const void *, GLenum);
        void set_sub_data(unsigned, unsigned, const void *);
        std::string describe() const;
 };
 
+struct BufferBindingState
+{
+       AutoConstPtr<BufferState> buffer;
+       unsigned offset;
+       unsigned size;
+
+       BufferBindingState();
+};
+
 #endif