mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
press 'm' to toggle multisample enable/disable
This commit is contained in:
parent
634d2af2b0
commit
2ce4b985a5
1 changed files with 10 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue