X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fvertexsetup.h;fp=source%2Fcore%2Fvertexsetup.h;h=408d738012fb196be44555c3bb25b9fe9672582a;hp=3b18006af04918661150d285ea6563664db51b32;hb=9b3bce7ae76ff8c0c81315d2505ea96bf422a318;hpb=a482029babea3210840d8c62e9df9ece4342b2b9 diff --git a/source/core/vertexsetup.h b/source/core/vertexsetup.h index 3b18006a..408d7380 100644 --- a/source/core/vertexsetup.h +++ b/source/core/vertexsetup.h @@ -7,13 +7,14 @@ 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 +class VertexSetup { private: enum ComponentMask @@ -47,12 +48,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();