summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-06-30 16:57:21 +0100
committerKeith Whitwell <keithw@vmware.com>2009-06-30 16:57:21 +0100
commit1730eaa2a2454018b4907df2f2bda3c4455137ca (patch)
treeb4e3243c49ee22a46b435720cfdd60786c7a2361
parent4147bb24d49a10498e00039fc1dc9aa5f1316777 (diff)
dlist-tri-flat-tri: make tri render differently if flatshade not enabled
When testing flat-shading, it helps to specify per-vertex colors so that you can distinguish between flat & smooth shading.
-rw-r--r--progs/trivial/dlist-tri-flat-tri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/progs/trivial/dlist-tri-flat-tri.c b/progs/trivial/dlist-tri-flat-tri.c
index b2a408512d..4dbb788486 100644
--- a/progs/trivial/dlist-tri-flat-tri.c
+++ b/progs/trivial/dlist-tri-flat-tri.c
@@ -70,9 +70,11 @@ static void Init(void)
*/
glShadeModel( GL_FLAT );
glBegin(GL_TRIANGLES);
- glColor3f(0,1,0);
+ glColor3f(1,0,0);
glVertex3f( -0.5, 0.5, -30.0);
+ glColor3f(0,1,0);
glVertex3f( -0.5, -0.5, -30.0);
+ glColor3f(0,0,1);
glVertex3f( 0.5, 0.0, -30.0);
glEnd();