added code to test per-vertex colors
authorBrian <brian.paul@tungstengraphics.com>
Tue, 24 Jul 2007 18:28:01 +0000 (12:28 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 24 Jul 2007 18:28:01 +0000 (12:28 -0600)
progs/trivial/fs-tri.c

index ecb13fd56d5a899faaa8b0ea0cb54372e0e45224..3be4d42e54cd8d7fc6a99216d72f1e362c8a0fcb 100644 (file)
@@ -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 =