From a1a6ac4af4ba5b1da7c768d892b84cb1204c4c7f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 20 Jul 2006 04:16:26 +0000 Subject: Instead of testing ctx->_TriangleCaps for flat/smooth shading, just use ctx->Light.ShadeModel --- src/mesa/tnl_dd/t_dd_unfilled.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/mesa/tnl_dd/t_dd_unfilled.h') diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h index 46415ea5f6..e4d82aa080 100644 --- a/src/mesa/tnl_dd/t_dd_unfilled.h +++ b/src/mesa/tnl_dd/t_dd_unfilled.h @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 6.5.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -53,7 +52,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx, v[1] = (VERTEX *)GET_VERTEX(e1); v[2] = (VERTEX *)GET_VERTEX(e2); - if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) { + if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) { if (HAVE_RGBA) { VERT_SAVE_RGBA(0); VERT_SAVE_RGBA(1); @@ -98,7 +97,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx, } } - if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) { + if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) { if (HAVE_RGBA) { VERT_RESTORE_RGBA(0); VERT_RESTORE_RGBA(1); @@ -133,7 +132,7 @@ static void TAG(unfilled_quad)( GLcontext *ctx, /* Hardware flatshading breaks down here. If the hardware doesn't * support flatshading, this will already have been done: */ - if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) { + if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) { if (HAVE_RGBA) { VERT_SAVE_RGBA(0); VERT_SAVE_RGBA(1); @@ -175,7 +174,7 @@ static void TAG(unfilled_quad)( GLcontext *ctx, if (ef[e3]) LINE( v[3], v[0] ); } - if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) { + if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) { if (HAVE_RGBA) { VERT_RESTORE_RGBA(0); VERT_RESTORE_RGBA(1); -- cgit v1.2.3