mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
added code to test per-vertex colors
This commit is contained in:
parent
43d7c1fe9d
commit
3af7876521
1 changed files with 5 additions and 0 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue