-/* $Id: enable.c,v 1.46 2001/03/29 16:50:32 brianp Exp $ */
+/* $Id: enable.c,v 1.48 2001/03/29 21:16:25 keithw Exp $ */
/*
* Mesa 3-D graphics library
ctx->Transform.ClipEnabled[p] = state;
if (state) {
- ctx->_Enabled |= ENABLE_USERCLIP;
ctx->Transform._AnyClip++;
if (ctx->ProjectionMatrix.flags & MAT_DIRTY) {
_mesa_transform_vector( ctx->Transform._ClipUserPlane[p],
ctx->Transform.EyeUserPlane[p],
ctx->ProjectionMatrix.inv );
- } else {
- if (--ctx->Transform._AnyClip == 0)
- ctx->_Enabled &= ~ENABLE_USERCLIP;
}
}
break;
return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Enabled = state;
- ctx->_Enabled ^= ENABLE_FOG;
break;
case GL_HISTOGRAM:
if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Enabled = state;
- ctx->_Enabled ^= ENABLE_LIGHT;
if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
ctx->Transform.Normalize = state;
- ctx->_Enabled ^= ENABLE_NORMALIZE;
break;
case GL_POINT_SMOOTH:
if (ctx->Point.SmoothFlag==state)
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
ctx->Transform.RescaleNormals = state;
- ctx->_Enabled ^= ENABLE_RESCALE;
break;
case GL_SCISSOR_TEST:
if (ctx->Scissor.Enabled==state)
return;
FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.Enabled = state;
- ctx->_TriangleCaps ^= DD_STENCIL;
break;
case GL_TEXTURE_1D: {
const GLuint curr = ctx->Texture.CurrentUnit;