diff options
author | Brian <[email protected]> | 2007-09-27 10:24:17 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-09-27 10:39:01 -0600 |
commit | ed6d5ff6f8fdd34aaaa126119dbd8e1e321859d8 (patch) | |
tree | fc96d0a93505aa755e0b0889b6f0d3f7273ffb5d /src/mesa/main/light.c | |
parent | 4f9d29cd4e876cd202a7d3e81f6d91fc7f9625a2 (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.c | 9 |
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) |