]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/vertexsetup.h
Remove the Bindable class
[libs/gl.git] / source / core / vertexsetup.h
index 3b18006af04918661150d285ea6563664db51b32..7eb903aeae9f819e43258c0b510bfebba638c73f 100644 (file)
@@ -1,19 +1,19 @@
 #ifndef MSP_GL_VERTEXSETUP_H_
 #define MSP_GL_VERTEXSETUP_H_
 
-#include "bindable.h"
 #include "vertexformat.h"
 
 namespace Msp {
 namespace GL {
 
+class Buffer;
 class VertexArray;
 
 /**
 Combines a VertexArray with an index buffer.  This wraps OpenGL's vertex array
 objects.  Intended for internal use.
 */
-class VertexSetup: public Bindable<VertexSetup>
+class VertexSetup
 {
 private:
        enum ComponentMask
@@ -47,12 +47,13 @@ public:
 
 private:
        static bool verify_format(const VertexFormat &);
-       void update(unsigned) const;
+       void update() const;
        void update_vertex_array(const VertexArray &, unsigned, unsigned, bool) const;
 
 public:
-       void bind() const;
-       static void unbind();
+       void refresh() const { if(dirty) update(); }
+
+       unsigned get_id() const { return id; }
 
        void unload();