cogl-gles2-wrapper: Layers aren't equal if one is enabled and one is not

Previously when comparing whether the settings for a layer are equal
it would only check if one of them was enabled. If so then it would
assume the other one was enabled and continue to compare the texture
environment. Now it also checks whether the enabledness differs.
This commit is contained in:
Neil Roberts 2010-07-13 13:59:07 +01:00
parent 23a172935d
commit ccd45fc723

View File

@ -252,6 +252,11 @@ cogl_gles2_settings_equal (const CoglGles2WrapperSettings *a,
/* Compare layer combine operation for each active unit */
if (fragment_tests)
for (i = 0; i < COGL_GLES2_MAX_TEXTURE_UNITS; i++)
{
if (!!COGL_GLES2_TEXTURE_UNIT_IS_ENABLED (a->texture_units, i) !=
!!COGL_GLES2_TEXTURE_UNIT_IS_ENABLED (b->texture_units, i))
return FALSE;
if (COGL_GLES2_TEXTURE_UNIT_IS_ENABLED (a->texture_units, i))
{
const CoglGles2WrapperTexEnv *tex_env_a = a->tex_env + i;
@ -280,6 +285,7 @@ cogl_gles2_settings_equal (const CoglGles2WrapperSettings *a,
return FALSE;
}
}
}
return TRUE;
}