From 0062e134b1caf75cecb6b8ef81c150002622942f Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 26 Mar 2011 00:12:09 +0000 Subject: [PATCH] fix cegui + shader issue --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index bd705809f8..dc116de8ff 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -1958,6 +1958,11 @@ void CLP(GraphicsStateGuardian):: clear_before_callback() { disable_standard_vertex_arrays(); unbind_buffers(); + + // Some callbacks may quite reasonably assume that the active + // texture stage is still set to stage 0. CEGUI, in particular, + // makes this assumption. + _glActiveTexture(GL_TEXTURE0); } ////////////////////////////////////////////////////////////////////