diff options
author | Brian Paul <brianp@vmware.com> | 2009-03-02 11:46:49 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-03-02 11:49:37 -0700 |
commit | f352a80aec10c3faf2d84e0b35d59b4edc0395ef (patch) | |
tree | 5350d8841d162f7ef754a167da137683acfa53e0 /src/mesa/main/stencil.c | |
parent | 2755a27d7dd313617b6bcc48afe6a321ee3609b2 (diff) | |
download | external_mesa3d-f352a80aec10c3faf2d84e0b35d59b4edc0395ef.zip external_mesa3d-f352a80aec10c3faf2d84e0b35d59b4edc0395ef.tar.gz external_mesa3d-f352a80aec10c3faf2d84e0b35d59b4edc0395ef.tar.bz2 |
mesa: add ctx->Stencil._Enabled field
Only true if stenciling is enabled, and there's a stencil buffer.
Diffstat (limited to 'src/mesa/main/stencil.c')
-rw-r--r-- | src/mesa/main/stencil.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c index e4a255d..15c98e2 100644 --- a/src/mesa/main/stencil.c +++ b/src/mesa/main/stencil.c @@ -536,7 +536,11 @@ _mesa_update_stencil(GLcontext *ctx) { const GLint face = ctx->Stencil._BackFace; - ctx->Stencil._TestTwoSide = + ctx->Stencil._Enabled = (ctx->Stencil.Enabled && + ctx->DrawBuffer->Visual.stencilBits > 0); + + ctx->Stencil._TestTwoSide = + ctx->Stencil._Enabled && (ctx->Stencil.Function[0] != ctx->Stencil.Function[face] || ctx->Stencil.FailFunc[0] != ctx->Stencil.FailFunc[face] || ctx->Stencil.ZPassFunc[0] != ctx->Stencil.ZPassFunc[face] || |