X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexarray.h;h=6e54f681717f4269fb135f66bd18420b5d87943e;hp=9610905d218994fcb2e539a6fe06d1a4e3934a41;hb=HEAD;hpb=85facfb688035b5bbc9a3a87d080582fbf34930b diff --git a/source/vertexarray.h b/source/vertexarray.h deleted file mode 100644 index 9610905d..00000000 --- a/source/vertexarray.h +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#ifndef MSP_GL_VERTEXARRAY_H_ -#define MSP_GL_VERTEXARRAY_H_ - -#include -#include -#include -#include "types.h" -#include "vertexarraybuilder.h" -#include "vertexformat.h" - -namespace Msp { -namespace GL { - -class VertexBuffer; - -class VertexArray -{ -public: - class Loader: public DataFile::Loader, public VertexArrayBuilder - { - public: - Loader(VertexArray &); - }; - - VertexArray(VertexFormat); - ~VertexArray(); - - VertexFormat get_format() const { return format; } - const std::vector &get_data() const { return data; } - void use_vertex_buffer(); - void use_vertex_buffer(VertexBuffer *); - void clear(); - void reset(VertexFormat); - RefPtr modify(); - void apply() const; - void update_data(); -private: - VertexFormat format; - std::vector data; - uint stride; - VertexBuffer *vbuf; - bool own_vbuf; - - VertexArray(const VertexArray &); - VertexArray &operator=(const VertexArray &); - void set_array(unsigned, unsigned, unsigned) const; - - static unsigned enabled_arrays; -}; - -} // namespace GL -} // namespace Msp - -#endif