X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fvertexsetup.h;h=7eb903aeae9f819e43258c0b510bfebba638c73f;hb=715672cf2c64dab0744db676fdee255ee3a4cef7;hp=3b18006af04918661150d285ea6563664db51b32;hpb=d40673bd28c4b4524d3642b949d9d109dc6f9f24;p=libs%2Fgl.git diff --git a/source/core/vertexsetup.h b/source/core/vertexsetup.h index 3b18006a..7eb903ae 100644 --- a/source/core/vertexsetup.h +++ b/source/core/vertexsetup.h @@ -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 +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();