Fix reversed enable logic in enable_texture

Fix bug inserted in commit c9e723e501.
Discovered by Oliver McFadden (z3ro).
This commit is contained in:
Ian Romanick 2007-05-10 15:00:41 -07:00
parent c103453d4f
commit 64a6a50155

View file

@ -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)