X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexsetup.h;h=9e7409ac64b71f3574a32c778964089e21bdf3bf;hp=c4cadfcaed49a9206d3ef500df6688b4f762edae;hb=HEAD;hpb=f5ac652497f22b159b5e44bf69f44092ff91936b diff --git a/source/vertexsetup.h b/source/vertexsetup.h deleted file mode 100644 index c4cadfca..00000000 --- a/source/vertexsetup.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef MSP_GL_VERTEXSETUP_H_ -#define MSP_GL_VERTEXSETUP_H_ - -#include "bindable.h" - -namespace Msp { -namespace GL { - -class VertexArray; - -/** -Combines a VertexArray with an index buffer. This wraps OpenGL's vertex array -objects. Intended for internal use. -*/ -class VertexSetup: public Bindable -{ -private: - enum ComponentMask - { - VERTEX_ARRAY = 1, - INDEX_BUFFER = 2 - }; - - unsigned id; - mutable unsigned dirty; - const VertexArray *array; - const Buffer *index_buffer; - -public: - VertexSetup(); - ~VertexSetup(); - - void set_vertex_array(const VertexArray &); - void set_instance_array(const VertexArray &); - void set_index_buffer(const Buffer &); - const Buffer *get_index_buffer() const { return index_buffer; } - -private: - void update(unsigned) const; - void update_vertex_array() const; - -public: - void bind() const; - static void unbind(); -}; - -} // namespace GL -} // namespace Msp - -#endif