summaryrefslogtreecommitdiff
path: root/progs/tests/antialias.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2008-07-25 18:31:44 -0700
committerIan Romanick <ian.d.romanick@intel.com>2008-07-25 18:31:44 -0700
commit1e645b365900cf1c71ca5594bd6b549a1f203040 (patch)
treed114e55df428550c9829acf929b9fb7bcb89c429 /progs/tests/antialias.c
parente5022c3fdf9888857f22f9a1690035ff3f90d36b (diff)
parent9bc9e0ecb0fb2069b2c123e665eb2118e358098f (diff)
Merge branch 'master' into drm-gem
Conflicts: src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/i965/brw_wm_surface_state.c
Diffstat (limited to 'progs/tests/antialias.c')
-rw-r--r--progs/tests/antialias.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/progs/tests/antialias.c b/progs/tests/antialias.c
index 79b5ab75c5..c389bbea3a 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;