diff options
author | Brian Paul <[email protected]> | 2008-07-01 08:48:48 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-07-01 08:49:12 -0600 |
commit | 2ce4b985a56fc05ea1f33b68a987bf866ab06d11 (patch) | |
tree | c0870eb656182492c9ea5f8f92dc0c2c6c59e01c /progs/tests | |
parent | 634d2af2b01f4e7ce8fa3ff65f64a446f859821a (diff) |
press 'm' to toggle multisample enable/disable
Diffstat (limited to 'progs/tests')
-rw-r--r-- | progs/tests/antialias.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/progs/tests/antialias.c b/progs/tests/antialias.c index 79b5ab75c57..c389bbea3a8 100644 --- a/progs/tests/antialias.c +++ b/progs/tests/antialias.c @@ -16,6 +16,7 @@ static GLfloat Zrot = 0; static GLboolean Anim = GL_TRUE; static GLboolean HaveMultisample = GL_TRUE; +static GLboolean DoMultisample = GL_TRUE; static void @@ -86,7 +87,10 @@ Display( void ) glColor3f(1, 1, 1); if (HaveMultisample) { glRasterPos2f(-3.1, -1.6); - PrintString("MULTISAMPLE"); + if (DoMultisample) + PrintString("MULTISAMPLE"); + else + PrintString("MULTISAMPLE (off)"); } glRasterPos2f(-0.8, -1.6); PrintString("No antialiasing"); @@ -96,7 +100,8 @@ Display( void ) /* multisample */ if (HaveMultisample) { glEnable(GL_DEPTH_TEST); - glEnable(GL_MULTISAMPLE_ARB); + if (DoMultisample) + glEnable(GL_MULTISAMPLE_ARB); glPushMatrix(); glTranslatef(-2.5, 0, 0); glPushMatrix(); @@ -173,6 +178,9 @@ Key( unsigned char key, int x, int y ) else glutIdleFunc(NULL); break; + case 'm': + DoMultisample = !DoMultisample; + break; case 'z': Zrot = (int) (Zrot - step); break; |