From 64a6a50155e665c2b81e9d70ce71cfd5f1fcaef1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 10 May 2007 15:00:41 -0700 Subject: [PATCH] Fix reversed enable logic in enable_texture Fix bug inserted in commit c9e723e5013443df984cb3987ffa3a9ba3384b89. Discovered by Oliver McFadden (z3ro). --- src/mesa/main/enable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 1cc84465922..0e14345e730 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -198,7 +198,7 @@ enable_texture(GLcontext *ctx, GLboolean state, GLbitfield bit) { const GLuint curr = ctx->Texture.CurrentUnit; struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; - const GLuint newenabled = (state) + const GLuint newenabled = (!state) ? (texUnit->Enabled & ~bit) : (texUnit->Enabled | bit); if (!ctx->DrawBuffer->Visual.rgbMode || texUnit->Enabled == newenabled) -- 2.30.2