]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexbuffer.h
Generalize VertexBuffer into Buffer with support for other types as well
[libs/gl.git] / source / vertexbuffer.h
index 815e268288f985f63bdcba1528d9d87843bb6915..b0963fb358e70e083d2424868a5306e3eea7b2ad 100644 (file)
@@ -8,24 +8,21 @@ Distributed under the LGPL
 #ifndef MSP_GL_VERTEXBUFFER_H_
 #define MSP_GL_VERTEXBUFFER_H_
 
-#include "types.h"
+#include "buffer.h"
 
 namespace Msp {
 namespace GL {
 
-class VertexBuffer
+/**
+Deprecated.  Equivalent to Buffer of type ARRAY_BUFFER.  Retained for backwards
+compatibility only.
+*/
+class VertexBuffer: public Buffer
 {
 public:
-       VertexBuffer();
-       void bind() const;
-       void data(sizei, void *);
-       ~VertexBuffer();
-
-       static void unbind();
-private:
-       uint id;
+       VertexBuffer(): Buffer(ARRAY_BUFFER) { }
 
-       static const VertexBuffer *bound;
+       static void unbind() { Buffer::unbind(ARRAY_BUFFER); }
 };
 
 } // namespace GL