diff --git a/cogl/cogl-primitive.c b/cogl/cogl-primitive.c index 6fa9a9d42..bef50a723 100644 --- a/cogl/cogl-primitive.c +++ b/cogl/cogl-primitive.c @@ -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) { diff --git a/cogl/cogl-primitive.h b/cogl/cogl-primitive.h index debaba1fb..fa54fc6b7 100644 --- a/cogl/cogl-primitive.h +++ b/cogl/cogl-primitive.h @@ -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 diff --git a/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt b/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt index d338d8535..50abc6f95 100644 --- a/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt +++ b/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt @@ -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