currently there is only one version of update_vertex_data, which completely rewrites the buffer.
provide an overload that takes new data and overwrites existing data in the existing buffer.
void ewbgl1es2_model::update_vertex_data(data, index)?
q: what should the behaviour be if the new data requries a resize?
model does not keep around a copy of its vertex data, so i cannot resize. therfore update_vertex_data cannot be completed. it should throw an invalid_arg OR update_vertex_data should be renamed try_update_vertex_data and should return a bool.
Im going to go with the throw first, i think its reasonable to expect the user to keep track of this data.
q: in the existing overload, do I check if the upload failed? that should be done. if it fails it should throw.
currently there is only one version of update_vertex_data, which completely rewrites the buffer.
provide an overload that takes new data and overwrites existing data in the existing buffer.
void ewbgl1es2_model::update_vertex_data(data, index)?
q: what should the behaviour be if the new data requries a resize?
model does not keep around a copy of its vertex data, so i cannot resize. therfore update_vertex_data cannot be completed. it should throw an invalid_arg OR update_vertex_data should be renamed try_update_vertex_data and should return a bool.
Im going to go with the throw first, i think its reasonable to expect the user to keep track of this data.
q: in the existing overload, do I check if the upload failed? that should be done. if it fails it should throw.