X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexarray.h;h=f0baf2d4a84fa8896b21c351149d9cd28612ee04;hp=b1b5fdee58baa672a6a45080e9909cc3ab0696b2;hb=e92458a4a0e6191bff549a8b316dbbbd7c56e90f;hpb=0bea04fdbb08596dcf57210164d5dbb10308b4d7 diff --git a/source/vertexarray.h b/source/vertexarray.h index b1b5fdee..f0baf2d4 100644 --- a/source/vertexarray.h +++ b/source/vertexarray.h @@ -23,6 +23,8 @@ class VertexBuffer; class VertexArray { + friend class VertexArrayBuilder; + public: class Loader: public DataFile::Loader, public VertexArrayBuilder { @@ -30,6 +32,16 @@ public: Loader(VertexArray &); }; +private: + VertexFormat format; + std::vector data; + uint stride; + VertexBuffer *vbuf; + bool own_vbuf; + + VertexArray(const VertexArray &); + VertexArray &operator=(const VertexArray &); +public: VertexArray(VertexFormat); ~VertexArray(); @@ -45,14 +57,6 @@ public: 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;