+++ /dev/null
-/* $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 <vector>
-#include <msp/core/refptr.h>
-#include <msp/datafile/loader.h>
-#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<float> &get_data() const { return data; }
- void use_vertex_buffer();
- void use_vertex_buffer(VertexBuffer *);
- void clear();
- void reset(VertexFormat);
- RefPtr<VertexArrayBuilder> modify();
- void apply() const;
- void update_data();
-private:
- VertexFormat format;
- std::vector<float> 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