Always bind a new texture to unit 1 when necessary
The special handling for texture unit 1 caught the case where unit 1 was changed for transient purposes, but didn't properly handle the case where the actual non-transient texture was different between two materials with no transient binding in between. If the actual texture has changed when flushing, mark unit 1 as dirty and needing a rebind. http://bugzilla.clutter-project.org/show_bug.cgi?id=2261
This commit is contained in:
parent
242afd96eb
commit
d8e521af0a
1 changed files with 3 additions and 1 deletions
|
@ -737,7 +737,9 @@ flush_layers_common_gl_state_cb (CoglMaterialLayer *layer, void *user_data)
|
||||||
*/
|
*/
|
||||||
if (unit->gl_texture != gl_texture || unit->is_foreign)
|
if (unit->gl_texture != gl_texture || unit->is_foreign)
|
||||||
{
|
{
|
||||||
if (unit_index != 1)
|
if (unit_index == 1)
|
||||||
|
unit->dirty_gl_texture = TRUE;
|
||||||
|
else
|
||||||
GE (glBindTexture (gl_target, gl_texture));
|
GE (glBindTexture (gl_target, gl_texture));
|
||||||
unit->gl_texture = gl_texture;
|
unit->gl_texture = gl_texture;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue