summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2010-11-30 22:17:17 +0000
committerNeil Roberts <neil@linux.intel.com>2010-11-30 22:45:17 +0000
commit18f2a718677982c595830e09fe3540aca1d6a7d8 (patch)
tree346c23402e94372ed963db70b7a369d87d9f1293
parenta356c82b5dcc37b984033ecfedc0004bf6408627 (diff)
downloadclutter-18f2a718677982c595830e09fe3540aca1d6a7d8.tar.gz
cogl-pipeline-opengl: Fix enabling previously disabled units
When enabling a unit that was disabled from a previous flush pipeline it was forgetting to rebind the right texture unit so it wouldn't work. This was causing the redhand to disappear when using the fixed function backend in test-cogl-multitexture if anything else is added to the scene. (cherry picked from commit 499a370ee326ea24fd0fff55466877a6f286d9fd)
-rw-r--r--clutter/cogl/cogl/cogl-material-opengl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clutter/cogl/cogl/cogl-material-opengl.c b/clutter/cogl/cogl/cogl-material-opengl.c
index 93ba3226a..0346d605e 100644
--- a/clutter/cogl/cogl/cogl-material-opengl.c
+++ b/clutter/cogl/cogl/cogl-material-opengl.c
@@ -782,6 +782,7 @@ flush_layers_common_gl_state_cb (CoglMaterialLayer *layer, void *user_data)
if (!G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_DISABLE_TEXTURING) &&
!unit->enabled)
{
+ _cogl_set_active_texture_unit (unit_index);
GE (glEnable (unit->current_gl_target));
unit->enabled = TRUE;
}