]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexarray.h
Generalize VertexBuffer into Buffer with support for other types as well
[libs/gl.git] / source / vertexarray.h
index ef7f6a24c23482292d38db863c56353159afed9e..281996d457da92894c6a4eb58111564c81c0ef43 100644 (file)
@@ -19,7 +19,7 @@ Distributed under the LGPL
 namespace Msp {
 namespace GL {
 
-class VertexBuffer;
+class Buffer;
 
 class VertexArray
 {
@@ -34,7 +34,7 @@ private:
        VertexFormat format;
        std::vector<float> data;
        uint         stride;
-       VertexBuffer *vbuf;
+       Buffer       *vbuf;
        bool         own_vbuf;
 
        VertexArray(const VertexArray &);
@@ -46,7 +46,7 @@ public:
        const VertexFormat &get_format() const { return format; }
        const std::vector<float> &get_data() const { return data; }
        void         use_vertex_buffer();
-       void         use_vertex_buffer(VertexBuffer *);
+       void         use_vertex_buffer(Buffer *);
        void         reserve(unsigned);
        unsigned     size() const { return data.size()/stride; }
        void         clear();