diff options
author | Brian <[email protected]> | 2006-12-13 15:31:14 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2006-12-13 15:31:14 -0700 |
commit | 8dcfcad7a2598ba835930aac8f3fd6576e464c1c (patch) | |
tree | 980a80caa5c4c2666b106285d72bcff009adde25 /src/mesa/main/light.c | |
parent | 6c305c083113075a1f11d5081b8c9dd1b98a7b1e (diff) |
Move all the code for computing ctx->_TriangleCaps into state.c.
ctx->_TriangleCaps should probably go away altogether someday...
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r-- | src/mesa/main/light.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 984f7b2abc4..92d8a0ae0d4 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * @@ -44,7 +44,7 @@ _mesa_ShadeModel( GLenum mode ) _mesa_debug(ctx, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode)); if (mode != GL_FLAT && mode != GL_SMOOTH) { - _mesa_error( ctx, GL_INVALID_ENUM, "glShadeModel" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glShadeModel"); return; } @@ -53,9 +53,8 @@ _mesa_ShadeModel( GLenum mode ) FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.ShadeModel = mode; - ctx->_TriangleCaps ^= DD_FLATSHADE; if (ctx->Driver.ShadeModel) - (*ctx->Driver.ShadeModel)( ctx, mode ); + ctx->Driver.ShadeModel( ctx, mode ); } @@ -442,11 +441,6 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params ) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.Model.TwoSide = newbool; - - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; break; case GL_LIGHT_MODEL_COLOR_CONTROL: if (params[0] == (GLfloat) GL_SINGLE_COLOR) @@ -728,7 +722,7 @@ _mesa_ColorMaterial( GLenum face, GLenum mode ) } if (ctx->Driver.ColorMaterial) - (*ctx->Driver.ColorMaterial)( ctx, face, mode ); + ctx->Driver.ColorMaterial( ctx, face, mode ); } |