vertex-array: Adds data arg for _vertex_array_new()

This adds an optional data argument for cogl_vertex_array_new() since it
seems that mostly every case where we use this API we follow up with a
cogl_buffer_set_data() matching the size of the new array. This
simplifies all those cases and whenever we want to delay uploading of
data then NULL can simply be passed.
This commit is contained in:
Robert Bragg
2010-11-16 08:49:55 +00:00
parent 60daaff724
commit 982f1b4bd0
7 changed files with 33 additions and 50 deletions

View File

@ -1132,7 +1132,8 @@ cogl_vertex_buffer_vbo_resolve (CoglVertexBuffer *buffer,
if (!found_target_vbo)
{
new_cogl_vbo->array = cogl_vertex_array_new (new_cogl_vbo->array_bytes);
new_cogl_vbo->array = cogl_vertex_array_new (new_cogl_vbo->array_bytes,
NULL);
upload_attributes (new_cogl_vbo);
*final_vbos = g_list_prepend (*final_vbos, new_cogl_vbo);