properly pop the GL_TEXTURE_GEN_ enable state
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 27 May 2005 14:44:14 +0000 (14:44 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 27 May 2005 14:44:14 +0000 (14:44 +0000)
src/mesa/main/attrib.c

index da6011c1cef883dee88c1ca7a959d763aa3f55d4..21e22ccedd03ab95c62ab515412c5da229e2c4dc 100644 (file)
@@ -649,6 +649,14 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
       _mesa_TexGenfv(GL_T, GL_EYE_PLANE, unit->EyePlaneT);
       _mesa_TexGenfv(GL_R, GL_EYE_PLANE, unit->EyePlaneR);
       _mesa_TexGenfv(GL_Q, GL_EYE_PLANE, unit->EyePlaneQ);
+      _mesa_set_enable(ctx, GL_TEXTURE_GEN_S,
+                       ((unit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE));
+      _mesa_set_enable(ctx, GL_TEXTURE_GEN_T,
+                       ((unit->TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE));
+      _mesa_set_enable(ctx, GL_TEXTURE_GEN_R,
+                       ((unit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE));
+      _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q,
+                       ((unit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE));
       if (ctx->Extensions.EXT_texture_lod_bias) {
          _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
                        GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias);