diff options
author | Brian Paul <[email protected]> | 2003-11-12 15:27:52 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-11-12 15:27:52 +0000 |
commit | 57857ca0925116d6d254fef7e705cfe0b650d77f (patch) | |
tree | 64d4b8ed52bafda589d9abf66a460402f92c97a4 /src/mesa/main/enable.c | |
parent | 80ee4b1e9dbf62f9aa86c3b8531615d14f077dd9 (diff) |
Ville Syrjala's logic op patch
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index f882f94fd25..a882cf4580c 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -231,9 +231,12 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) return; FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.BlendEnabled = state; - /* The following needed to accomodate 1.0 RGB logic op blending */ - ctx->Color.ColorLogicOpEnabled = - (ctx->Color.BlendEquation == GL_LOGIC_OP && state); + /* This is needed to support 1.1's RGB logic ops AND + * 1.0's blending logicops. + */ + ctx->Color._LogicOpEnabled = + (ctx->Color.ColorLogicOpEnabled || + (state && ctx->Color.BlendEquation == GL_LOGIC_OP)); break; #if FEATURE_userclip case GL_CLIP_PLANE0: @@ -383,6 +386,12 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) return; FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.ColorLogicOpEnabled = state; + /* This is needed to support 1.1's RGB logic ops AND + * 1.0's blending logicops. + */ + ctx->Color._LogicOpEnabled = + (state || (ctx->Color.BlendEnabled && + ctx->Color.BlendEquation == GL_LOGIC_OP)); break; case GL_MAP1_COLOR_4: if (ctx->Eval.Map1Color4 == state) |