[cogl] Add cogl_primitive_get_indices()
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Add cogl_primitive_get_indices()
- Date: Tue, 7 Feb 2012 15:30:32 +0000 (UTC)
commit 77c3b1b90560833e2a5e2ec46866a52098594634
Author: Neil Roberts <neil linux intel com>
Date: Mon Feb 6 14:01:24 2012 +0000
Add cogl_primitive_get_indices()
This adds a public getter for the indices property of CoglPrimitive.
Reviewed-by: Robert Bragg <robert linux intel com>
cogl/cogl-primitive.c | 6 ++++++
cogl/cogl-primitive.h | 13 +++++++++++++
.../cogl-2.0-experimental-sections.txt | 1 +
3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-primitive.c b/cogl/cogl-primitive.c
index 6fa9a9d..bef50a7 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 debaba1..fa54fc6 100644
--- a/cogl/cogl-primitive.h
+++ b/cogl/cogl-primitive.h
@@ -775,6 +775,19 @@ cogl_primitive_set_indices (CoglPrimitive *primitive,
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 d338d85..50abc6f 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]