mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Don't pass around NULL terminated CoglAttribute arrays
For the first iteration of the CoglAttribute API several of the new functions accepted a pointer to a NULL terminated list of CoglAttribute pointers - probably as a way to reduce the number of arguments required. This style isn't consistent with existing Cogl APIs though and so we now explicitly pass n_attributes arguments and don't require the NULL termination.
This commit is contained in:
@ -1165,7 +1165,7 @@ update_primitive_attributes (CoglVertexBuffer *buffer)
|
||||
|
||||
g_return_if_fail (n_attributes > 0);
|
||||
|
||||
attributes = g_alloca (sizeof (CoglAttribute *) * (n_attributes + 1));
|
||||
attributes = g_alloca (sizeof (CoglAttribute *) * n_attributes);
|
||||
|
||||
i = 0;
|
||||
for (l = buffer->submitted_vbos; l; l = l->next)
|
||||
@ -1195,9 +1195,7 @@ update_primitive_attributes (CoglVertexBuffer *buffer)
|
||||
}
|
||||
}
|
||||
|
||||
attributes[i] = NULL;
|
||||
|
||||
cogl_primitive_set_attributes (buffer->primitive, attributes);
|
||||
cogl_primitive_set_attributes (buffer->primitive, attributes, i);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user