[cogl/wip/neil/snippets: 24/27] attribute: Add the buffer and normalized property APIs to the header



commit 6ec8b77fdbed4b432dbc33e2c81919dd0a314104
Author: Neil Roberts <neil linux intel com>
Date:   Thu Dec 1 12:33:30 2011 +0000

    attribute: Add the buffer and normalized property APIs to the header
    
    The header was missing declarations for
    cogl_attribute_{get,set}_{buffer,normalized}.

 cogl/cogl-attribute.h                              |   62 ++++++++++++++++++++
 .../cogl-2.0-experimental-sections.txt             |    4 +
 2 files changed, 66 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-attribute.h b/cogl/cogl-attribute.h
index 755950e..c12990b 100644
--- a/cogl/cogl-attribute.h
+++ b/cogl/cogl-attribute.h
@@ -140,6 +140,68 @@ cogl_attribute_new (CoglAttributeBuffer *attribute_buffer,
                     CoglAttributeType type);
 
 /**
+ * cogl_attribute_set_normalized:
+ * @attribute: A #CoglAttribute
+ * @normalized: The new value for the normalized property.
+ *
+ * Sets whether fixed point attribute types are mapped to the range
+ * 0â1. For example when this property is TRUE and a
+ * %COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE type is used then the value 255
+ * will be mapped to 1.0.
+ *
+ * The default value of this property depends on the name of the
+ * attribute. For the builtin properties cogl_color_in and
+ * cogl_normal_in it will default to TRUE and for all other names it
+ * will default to FALSE.
+ *
+ * Stability: unstable
+ * Since: 1.10
+ */
+void
+cogl_attribute_set_normalized (CoglAttribute *attribute,
+                               gboolean normalized);
+
+/**
+ * cogl_attribute_get_normalized:
+ * @attribute: A #CoglAttribute
+ *
+ * Return value: the value of the normalized property set with
+ * cogl_attribute_set_normalized().
+ *
+ * Stability: unstable
+ * Since: 1.10
+ */
+gboolean
+cogl_attribute_get_normalized (CoglAttribute *attribute);
+
+/**
+ * cogl_attribute_get_buffer:
+ * @attribute: A #CoglAttribute
+ *
+ * Return value: the #CoglAttributeBuffer that was set with
+ * cogl_attribute_set_buffer() or cogl_attribute_new().
+ *
+ * Stability: unstable
+ * Since: 1.10
+ */
+CoglAttributeBuffer *
+cogl_attribute_get_buffer (CoglAttribute *attribute);
+
+/**
+ * cogl_attribute_set_buffer:
+ * @attribute: A #CoglAttribute
+ * @attribute_buffer: A #CoglAttributeBuffer
+ *
+ * Sets a new #CoglAttributeBuffer for the attribute.
+ *
+ * Stability: unstable
+ * Since: 1.10
+ */
+void
+cogl_attribute_set_buffer (CoglAttribute *attribute,
+                           CoglAttributeBuffer *attribute_buffer);
+
+/**
  * cogl_is_attribute:
  * @object: A #CoglObject
  *
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 8421263..0a9a655 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
@@ -189,6 +189,10 @@ cogl_is_index_array
 <TITLE>Vertex Attributes</TITLE>
 cogl_attribute_new
 cogl_is_attribute
+cogl_attribute_set_normalized
+cogl_attribute_get_normalized
+cogl_attribute_get_buffer
+cogl_attribute_set_buffer
 </SECTION>
 
 <SECTION>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]