stride=get_stride(format);
}
-RefPtr<VertexArrayBuilder> VertexArray::modify()
-{
- return new VertexArrayBuilder(*this);
-}
-
void VertexArray::apply() const
{
if(format==NODATA)
set_array(GL_TEXTURE_COORD_ARRAY, found&4, 4);
set_array(GL_COLOR_ARRAY, found&8, 8);
- VertexBuffer::unbind();
+ if(vbuf)
+ VertexBuffer::unbind();
}
/**
void VertexArray::update_data()
{
if(vbuf)
+ {
vbuf->data(data.size()*sizeof(float), &data[0]);
+ VertexBuffer::unbind();
+ }
+}
+
+float *VertexArray::append()
+{
+ data.insert(data.end(), stride, 0.0f);
+ return &*data.end()-stride;
}
void VertexArray::set_array(unsigned array, unsigned bit, unsigned mask) const