shader-effect: Remove unused function

The reset_uniforms() internal function is not used any more because the
CoglProgram cannot be reset post-creation - hence the uniforms cannot
change.
This commit is contained in:
Emmanuele Bassi 2010-11-29 10:59:16 +00:00
parent 08087c965b
commit 850a35f069

View File

@ -182,26 +182,6 @@ clutter_shader_effect_clear (ClutterShaderEffect *self,
priv->source_set = FALSE; priv->source_set = FALSE;
} }
static void
clutter_shader_effect_reset_uniforms (ClutterShaderEffect *effect)
{
ClutterShaderEffectPrivate *priv = effect->priv;
GHashTableIter iter;
gpointer key, value;
if (priv->uniforms == NULL)
return;
key = value = NULL;
g_hash_table_iter_init (&iter, priv->uniforms);
while (g_hash_table_iter_next (&iter, &key, &value))
{
ShaderUniform *uniform = value;
uniform->location = -1;
}
}
static void static void
clutter_shader_effect_update_uniforms (ClutterShaderEffect *effect) clutter_shader_effect_update_uniforms (ClutterShaderEffect *effect)
{ {
@ -826,6 +806,7 @@ clutter_shader_effect_set_shader_source (ClutterShaderEffect *effect,
priv->program = cogl_create_program (); priv->program = cogl_create_program ();
if (priv->shader == COGL_INVALID_HANDLE) if (priv->shader == COGL_INVALID_HANDLE)
{
switch (priv->shader_type) switch (priv->shader_type)
{ {
case CLUTTER_FRAGMENT_SHADER: case CLUTTER_FRAGMENT_SHADER:
@ -840,6 +821,7 @@ clutter_shader_effect_set_shader_source (ClutterShaderEffect *effect,
priv->shader = COGL_INVALID_HANDLE; priv->shader = COGL_INVALID_HANDLE;
break; break;
} }
}
g_assert (priv->shader != COGL_INVALID_HANDLE); g_assert (priv->shader != COGL_INVALID_HANDLE);