]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexbuffer.h
Add vertex arrays and buffers
[libs/gl.git] / source / vertexbuffer.h
diff --git a/source/vertexbuffer.h b/source/vertexbuffer.h
new file mode 100644 (file)
index 0000000..22fcdfb
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef MSP_GL_VERTEXBUFFER_H_
+#define MSP_GL_VERTEXBUFFER_H_
+
+#include "types.h"
+
+namespace Msp {
+namespace GL {
+
+class VertexBuffer
+{
+public:
+       VertexBuffer();
+       void bind() const;
+       void data(sizei, void *);
+       ~VertexBuffer();
+
+       static void unbind() { bound=0; }
+private:
+       uint id;
+
+       static const VertexBuffer *bound;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif