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:
parent
08087c965b
commit
850a35f069
@ -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,20 +806,22 @@ 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:
|
{
|
||||||
priv->shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
|
case CLUTTER_FRAGMENT_SHADER:
|
||||||
break;
|
priv->shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
|
||||||
|
break;
|
||||||
|
|
||||||
case CLUTTER_VERTEX_SHADER:
|
case CLUTTER_VERTEX_SHADER:
|
||||||
priv->shader = cogl_create_shader (COGL_SHADER_TYPE_VERTEX);
|
priv->shader = cogl_create_shader (COGL_SHADER_TYPE_VERTEX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user