summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-24 12:28:01 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-24 12:28:01 -0600
commit3af7876521e23152bc82f42f00e1a1d51bd37812 (patch)
treebe65ed5db90b1fa4138530d318893af956d7d314 /progs
parent43d7c1fe9d2544b851afa2f1c1e245a63860e670 (diff)
downloadexternal_mesa3d-3af7876521e23152bc82f42f00e1a1d51bd37812.zip
external_mesa3d-3af7876521e23152bc82f42f00e1a1d51bd37812.tar.gz
external_mesa3d-3af7876521e23152bc82f42f00e1a1d51bd37812.tar.bz2
added code to test per-vertex colors
Diffstat (limited to 'progs')
-rw-r--r--progs/trivial/fs-tri.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/trivial/fs-tri.c b/progs/trivial/fs-tri.c
index ecb13fd..3be4d42 100644
--- a/progs/trivial/fs-tri.c
+++ b/progs/trivial/fs-tri.c
@@ -27,8 +27,11 @@ Redisplay(void)
glTranslatef(xpos, ypos, 0);
glBegin(GL_TRIANGLES);
+ glColor3f(1, 0, 0);
glVertex2f(-0.9, -0.9);
+ glColor3f(0, 1, 0);
glVertex2f( 0.9, -0.9);
+ glColor3f(0, 0, 1);
glVertex2f( 0, 0.9);
glEnd();
@@ -143,6 +146,8 @@ Init(void)
static const char *fragShaderText =
"void main() {\n"
" gl_FragColor = gl_FragCoord * vec4(0.005); \n"
+ " //gl_FragColor = gl_Color; \n"
+ " //gl_FragColor = vec4(1, 0, 0.5, 0); \n"
"}\n";
#if 0
static const char *vertShaderText =