From 88e77b25dfeeead3b4d54d2b24ab9056459c6ee9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 27 Jul 2009 15:01:52 +0100 Subject: [PATCH] Convert gint to GLints in the Shader types wrapper The GValue wrappers for ClutterShader types should always store values using GL types (GLfloat, GLint) internally, but give and take generic C types (float, int) to the Clutter side. Fixes bug: http://bugzilla.openedhand.com/show_bug.cgi?id=1359 --- clutter/clutter-shader-types.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clutter/clutter-shader-types.c b/clutter/clutter-shader-types.c index e03d906b2..ac18ec048 100644 --- a/clutter/clutter-shader-types.c +++ b/clutter/clutter-shader-types.c @@ -87,8 +87,8 @@ struct _ClutterShaderFloat struct _ClutterShaderInt { - gint size; - int value[4]; + gint size; + GLint value[4]; }; struct _ClutterShaderMatrix @@ -420,9 +420,9 @@ clutter_value_set_shader_float (GValue *value, * Since: 0.8 */ void -clutter_value_set_shader_int (GValue *value, - gint size, - const gint *ints) +clutter_value_set_shader_int (GValue *value, + gint size, + const gint *ints) { ClutterShaderInt *shader_int; gint i; @@ -434,7 +434,7 @@ clutter_value_set_shader_int (GValue *value, shader_int->size = size; for (i = 0; i < size; i++) - shader_int->value[i] = ints[i]; + shader_int->value[i] = (GLint) ints[i]; } /** @@ -514,7 +514,7 @@ clutter_value_get_shader_float (const GValue *value, * * Since: 0.8 */ -G_CONST_RETURN int * +G_CONST_RETURN gint * clutter_value_get_shader_int (const GValue *value, gsize *length) {