X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fvertexarray.h;h=ef7f6a24c23482292d38db863c56353159afed9e;hb=d653d25b548070c688e40c052730d63345ce70c9;hp=02fa64f70b0f0cfdfe5c9fa0c893433fa59818f1;hpb=dc1d1159a61f378bda11e5989ad694a86b9a3c77;p=libs%2Fgl.git diff --git a/source/vertexarray.h b/source/vertexarray.h index 02fa64f7..ef7f6a24 100644 --- a/source/vertexarray.h +++ b/source/vertexarray.h @@ -40,24 +40,24 @@ private: VertexArray(const VertexArray &); VertexArray &operator=(const VertexArray &); public: - VertexArray(VertexFormat); + VertexArray(const VertexFormat &); ~VertexArray(); - VertexFormat get_format() const { return format; } + const VertexFormat &get_format() const { return format; } const std::vector &get_data() const { return data; } void use_vertex_buffer(); void use_vertex_buffer(VertexBuffer *); void reserve(unsigned); unsigned size() const { return data.size()/stride; } void clear(); - void reset(VertexFormat); + void reset(const VertexFormat &); void apply() const; void update_data(); float *append(); float *operator[](unsigned i) { return &data[0]+i*stride; } const float *operator[](unsigned i) const { return &data[0]+i*stride; } private: - void set_array(unsigned, unsigned, unsigned) const; + void set_array(unsigned, bool, unsigned) const; static unsigned enabled_arrays; };