[cogl/wip/neil/snippets: 4/22] attribute: Fix the default normalized value for cogl_color_in



commit 9ce72a323a5a5d05dbd9fea130bceb1eb81fc0fd
Author: Neil Roberts <neil linux intel com>
Date:   Thu Dec 1 10:36:38 2011 +0000

    attribute: Fix the default normalized value for cogl_color_in

 cogl/cogl-attribute.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-attribute.c b/cogl/cogl-attribute.c
index 72ee081..1c73bc9 100644
--- a/cogl/cogl-attribute.c
+++ b/cogl/cogl-attribute.c
@@ -73,7 +73,10 @@ validate_cogl_attribute_name (const char *name,
   if (strcmp (name, "position_in") == 0)
     *name_id = COGL_ATTRIBUTE_NAME_ID_POSITION_ARRAY;
   else if (strcmp (name, "color_in") == 0)
-    *name_id = COGL_ATTRIBUTE_NAME_ID_COLOR_ARRAY;
+    {
+      *name_id = COGL_ATTRIBUTE_NAME_ID_COLOR_ARRAY;
+      *normalized = TRUE;
+    }
   else if (strcmp (name, "tex_coord_in") == 0)
     *name_id = COGL_ATTRIBUTE_NAME_ID_TEXTURE_COORD_ARRAY;
   else if (strncmp (name, "tex_coord", strlen ("tex_coord")) == 0)



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