From ed6d5ff6f8fdd34aaaa126119dbd8e1e321859d8 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 27 Sep 2007 10:24:17 -0600 Subject: Restore old _TriangleCaps code to fix Blender problem (bug 12164) --- src/mesa/main/light.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mesa/main/light.c') diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 6e057614ba..6dd334e16d 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) -- cgit v1.2.3