static void clutter_shader_effect_set_uniform_valist (ClutterShaderEffect *effect, const gchar *name, GType value_type, gsize n_values, va_list *args) { GValue value = { 0, }; if (value_type == CLUTTER_TYPE_SHADER_INT) { gint *int_values = va_arg (*args, gint*); g_value_init (&value, CLUTTER_TYPE_SHADER_INT); clutter_value_set_shader_int (&value, n_values, int_values); goto add_uniform; }
static gchar * clutter_value_collect_shader_int (GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags) { gint int_count = collect_values[0].v_int; const int *ints = collect_values[1].v_pointer; if (!ints) return g_strdup_printf ("value location for '%s' passed as NULL", G_VALUE_TYPE_NAME (value)); clutter_value_init_shader_int (value); clutter_value_set_shader_int (value, int_count, ints); return NULL; }