diff options
author | Brian <[email protected]> | 2007-08-10 08:33:09 +0100 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-10 08:33:09 +0100 |
commit | c7157065b2c3be768e1b72e5a0980261bce315a7 (patch) | |
tree | 2a6d4deff37c317c4810a44ca459f17325fb8c07 /progs/trivial/tri.c | |
parent | 3a9eca5cc0a3a0c7f6198b37f61cc0d0ad45da1d (diff) |
change triangle orientation, fix exit()
Diffstat (limited to 'progs/trivial/tri.c')
-rw-r--r-- | progs/trivial/tri.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c index 51395f0a418..12fa8d11b61 100644 --- a/progs/trivial/tri.c +++ b/progs/trivial/tri.c @@ -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; } |