#define GLUT_DIRECT_RENDERING 0x01FE
/*
+ * New tokens for glutInitDisplayMode.
+ * Value 0x0400 is defined in OpenGLUT.
+ */
+#define GLUT_AUX1 0x1000
+#define GLUT_AUX2 0x2000
+#define GLUT_AUX3 0x4000
+#define GLUT_AUX4 0x8000
+
+/*
* Process loop function, see freeglut_main.c
*/
FGAPI void FGAPIENTRY glutMainLoopEvent( void );
"xstaticgray", "xgrayscale", "xstaticcolor", "xpseudocolor",
"xtruecolor", "xdirectcolor",
"xstaticgrey", "xgreyscale", "xstaticcolour", "xpseudocolour",
- "xtruecolour", "xdirectcolour", "borderless"
+ "xtruecolour", "xdirectcolour", "borderless", "aux"
};
+/* XXX why the heck do we use this table instead of strlen(Tokens[i])? */
static int TokenLengths[] =
{
5, 4, 3, 4, 6, 10, 5, 6,
11, 10, 12, 12,
10, 12,
11, 10, 13, 13,
- 11, 13, 10
+ 11, 13, 10, 3
};
void FGAPIENTRY glutInitDisplayString( const char* displayMode )
#endif
break ;
- case 36 : /* Unrecognized */
+ case 36 : /* "aux": some number of aux buffers */
+ glut_state_flag |= GLUT_AUX1;
+ break ;
+
+ case 37 : /* Unrecognized */
fgWarning ( "WARNING - Display string token not recognized: %s",
token );
break ;
ATTRIB_VAL( GLX_ACCUM_ALPHA_SIZE, 1 );
}
+ if( fgState.DisplayMode & GLUT_AUX1 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 1 );
+ if( fgState.DisplayMode & GLUT_AUX2 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 2 );
+ if( fgState.DisplayMode & GLUT_AUX3 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 3 );
+ if( fgState.DisplayMode & GLUT_AUX4 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 4 );
+
+
/* Push a null at the end of the list */
ATTRIB( None );