diff options
author | Brian Paul <[email protected]> | 1999-11-22 18:28:39 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 1999-11-22 18:28:39 +0000 |
commit | f2db7ed71e8811679e8bded5dc995092341b92cc (patch) | |
tree | 0ae1a612990bf00a53fe199498e7cfef35fdb60f /src/mesa | |
parent | 47cdadc6261f3b516229bdb04c56ffb6aa5c4e40 (diff) |
fixed shade model bug (A.Borrmann)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/attrib.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 4ca036110af..70c5141a200 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,4 +1,4 @@ -/* $Id: attrib.c,v 1.11 1999/11/11 01:22:25 brianp Exp $ */ +/* $Id: attrib.c,v 1.12 1999/11/22 18:28:39 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -613,7 +613,13 @@ void gl_PopAttrib( GLcontext* ctx ) } (*ctx->Driver.Enable)( ctx, GL_LIGHTING, ctx->Light.Enabled ); } - ctx->Enabled &= ENABLE_LIGHT; + if (ctx->Light.ShadeModel == GL_FLAT) + ctx->TriangleCaps |= DD_FLATSHADE; + else + ctx->TriangleCaps &= ~DD_FLATSHADE; + if (ctx->Driver.ShadeModel) + (*ctx->Driver.ShadeModel)(ctx, ctx->Light.ShadeModel); + ctx->Enabled &= ~ENABLE_LIGHT; if (ctx->Light.Enabled && !is_empty_list(&ctx->Light.EnabledList)) ctx->Enabled |= ENABLE_LIGHT; break; |