projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4147bb2
)
dlist-tri-flat-tri: make tri render differently if flatshade not enabled
author
Keith Whitwell
<keithw@vmware.com>
Tue, 30 Jun 2009 15:57:21 +0000
(16:57 +0100)
committer
Keith Whitwell
<keithw@vmware.com>
Tue, 30 Jun 2009 15:57:21 +0000
(16:57 +0100)
When testing flat-shading, it helps to specify per-vertex colors so
that you can distinguish between flat & smooth shading.
progs/trivial/dlist-tri-flat-tri.c
patch
|
blob
|
history
diff --git
a/progs/trivial/dlist-tri-flat-tri.c
b/progs/trivial/dlist-tri-flat-tri.c
index b2a408512de57acf6966889fd05947c591474702..4dbb7884869d3199f6e2373dd3bcfcfbda68f393 100644
(file)
--- 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();