summaryrefslogtreecommitdiff
path: root/src/mesa/tnl_dd/t_dd_unfilled.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-07-20 04:16:26 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-07-20 04:16:26 +0000
commita1a6ac4af4ba5b1da7c768d892b84cb1204c4c7f (patch)
tree18fced2177ddbc2de0234101c4164df66e1835b5 /src/mesa/tnl_dd/t_dd_unfilled.h
parent4e2de9531e4869edf12536c2cb37d3145ee4065c (diff)
Instead of testing ctx->_TriangleCaps for flat/smooth shading, just use ctx->Light.ShadeModel
Diffstat (limited to 'src/mesa/tnl_dd/t_dd_unfilled.h')
-rw-r--r--src/mesa/tnl_dd/t_dd_unfilled.h13
1 files changed, 6 insertions, 7 deletions
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);