Add cogl_primitive_get_indices()

This adds a public getter for the indices property of CoglPrimitive.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts 2012-02-06 14:01:24 +00:00
parent a226b368f3
commit 77c3b1b905
3 changed files with 20 additions and 0 deletions

View File

@ -524,6 +524,12 @@ cogl_primitive_set_indices (CoglPrimitive *primitive,
primitive->n_vertices = n_indices;
}
CoglIndices *
cogl_primitive_get_indices (CoglPrimitive *primitive)
{
return primitive->indices;
}
CoglPrimitive *
cogl_primitive_copy (CoglPrimitive *primitive)
{

View File

@ -774,6 +774,19 @@ cogl_primitive_set_indices (CoglPrimitive *primitive,
CoglIndices *indices,
int n_indices);
/**
* cogl_primitive_get_indices:
* @primitive: A #CoglPrimitive
*
* Return value: the indices that were set with
* cogl_primitive_set_indices() or %NULL if no indices were set.
*
* Since: 1.10
* Stability: unstable
*/
CoglIndices *
cogl_primitive_get_indices (CoglPrimitive *primitive);
/**
* cogl_primitive_copy:
* @primitive: A primitive copy

View File

@ -235,6 +235,7 @@ cogl_primitive_set_n_vertices
cogl_primitive_get_mode
cogl_primitive_set_mode
cogl_primitive_set_attributes
cogl_primitive_get_indices
cogl_primitive_set_indices
cogl_primitive_draw
cogl_primitive_copy