mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
change triangle orientation, fix exit()
This commit is contained in:
parent
3a9eca5cc0
commit
c7157065b2
1 changed files with 6 additions and 6 deletions
|
|
@ -59,7 +59,7 @@ static void Key(unsigned char key, int x, int y)
|
|||
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(1);
|
||||
exit(0);
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
@ -72,12 +72,12 @@ static void Draw(void)
|
|||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor3f(0,0,.7);
|
||||
glVertex3f( 0.9, -0.9, -30.0);
|
||||
glColor3f(.8,0,0);
|
||||
glVertex3f( 0.9, 0.9, -30.0);
|
||||
glVertex3f(-0.9, -0.9, -30.0);
|
||||
glColor3f(0,.9,0);
|
||||
glVertex3f(-0.9, 0.0, -30.0);
|
||||
glVertex3f( 0.9, -0.9, -30.0);
|
||||
glColor3f(0,0,.7);
|
||||
glVertex3f( 0.0, 0.9, -30.0);
|
||||
glEnd();
|
||||
|
||||
glFlush();
|
||||
|
|
@ -130,5 +130,5 @@ int main(int argc, char **argv)
|
|||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Draw);
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue