namespace Msp {
namespace GL {
-VertexArray::VertexArray():
- stride(0)
-{ }
-
VertexArray::VertexArray(const VertexFormat &f)
{
set_format(f);
data.clear();
}
-void VertexArray::reserve(unsigned n)
+void VertexArray::reserve(size_t n)
{
if(format.empty())
throw invalid_operation("VertexArray::reserve");
throw invalid_operation("VertexArray::append");
data.insert(data.end(), stride, 0.0f);
update_offset();
- dirty = true;
+ mark_dirty();
return &*(data.end()-stride);
}
-char *VertexArray::modify(unsigned i)
+char *VertexArray::modify(size_t i)
{
if(format.empty())
throw invalid_operation("VertexArray::modify");
- dirty = true;
+ mark_dirty();
return &data[0]+i*stride;
}
-unsigned VertexArray::get_data_size() const
+size_t VertexArray::get_data_size() const
{
return data.size();
}