summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-09-27 10:25:33 -0600
committerBrian <[email protected]>2007-09-27 10:25:33 -0600
commit0b9bb21ce4192b22bff67d22bbdee68f43db6010 (patch)
tree4ea9dc311bed57547cb099cf17114d48fa297f59 /src/mesa/main/light.c
parentcfcc5b794e916641099be0e9371946192a481df2 (diff)
Restore old _TriangleCaps code to fix Blender problem (bug 12164)
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r--src/mesa/main/light.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 6e057614bad..6dd334e16dc 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -53,6 +53,11 @@ _mesa_ShadeModel( GLenum mode )
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.ShadeModel = mode;
+ if (mode == GL_FLAT)
+ ctx->_TriangleCaps |= DD_FLATSHADE;
+ else
+ ctx->_TriangleCaps &= ~DD_FLATSHADE;
+
if (ctx->Driver.ShadeModel)
ctx->Driver.ShadeModel( ctx, mode );
}
@@ -441,6 +446,10 @@ _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)