X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexarray.h;h=f0baf2d4a84fa8896b21c351149d9cd28612ee04;hb=b8b06a0ff96763ba7e188d9fcacbd8c0e3dcd515;hp=b1b5fdee58baa672a6a45080e9909cc3ab0696b2;hpb=d1800d7ea80290f4913d0203241cef1409656522;p=libs%2Fgl.git 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;