mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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
b646f0cfa9
commit
de8276105f
@ -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_index != 1)
|
||||
if (unit_index == 1)
|
||||
unit->dirty_gl_texture = TRUE;
|
||||
else
|
||||
GE (glBindTexture (gl_target, gl_texture));
|
||||
unit->gl_texture = gl_texture;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user