diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2008-05-19 12:10:42 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2008-05-19 12:10:42 -0400 |
commit | 09900df42967a0ba61e78038304fd6c54934ad0d (patch) | |
tree | 8bf72aa313a23c8554fdda5c9381cc593132722d /progs/trivial/quad-tex-2d.c | |
parent | 1c624846a81b0218b4a07328f485e295432c6312 (diff) | |
parent | 59007a811de2d76ea00164e8f1cacb4a375d1458 (diff) |
Merge commit 'origin/gallium-0.1' into gallium-vertex-linear
Diffstat (limited to 'progs/trivial/quad-tex-2d.c')
-rw-r--r-- | progs/trivial/quad-tex-2d.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/progs/trivial/quad-tex-2d.c b/progs/trivial/quad-tex-2d.c index 3a6e5237ed..97c9fc54d8 100644 --- a/progs/trivial/quad-tex-2d.c +++ b/progs/trivial/quad-tex-2d.c @@ -31,6 +31,7 @@ static GLenum Target = GL_TEXTURE_2D; static GLenum Filter = GL_NEAREST; GLenum doubleBuffer; static float Rot = 0; +static int win = 0; static void Init(void) { @@ -88,6 +89,7 @@ static void Reshape(int width, int height) glFrustum(-1, 1, -1, 1, 10, 20); #endif glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); glTranslatef(0, 0, -15); } @@ -101,6 +103,7 @@ static void Key(unsigned char key, int x, int y) Rot -= 10.0; break; case 27: + glutDestroyWindow(win); exit(0); default: return; @@ -170,7 +173,8 @@ int main(int argc, char **argv) type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE; glutInitDisplayMode(type); - if (glutCreateWindow("First Tri") == GL_FALSE) { + win = glutCreateWindow("First Tri"); + if (!win) { exit(1); } |