* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <GL/freeglut.h>
#include "freeglut_internal.h"
/* Register the window class */
atom = RegisterClass( &wc );
- assert( atom );
+ FREEGLUT_INTERNAL_ERROR_EXIT ( atom, "Window Class Not Registered", "fghInitialize" );
}
/* The screen dimensions can be obtained via GetSystemMetrics() calls */
return;
}
- /* fgState.Initialised = GL_FALSE; */
-
/* If there was a menu created, destroy the rendering context */
if( fgStructure.MenuContext )
{
fgDestroyStructure( );
- while( ( timer = fgState.Timers.First ) )
+ while( ( timer = fgState.Timers.First) )
{
fgListRemove( &fgState.Timers, &timer->Node );
free( timer );
XCloseDisplay( fgDisplay.Display );
#endif
+
+ fgState.Initialised = GL_FALSE;
}
/*
* size.
*/
- if( geometry )
+ if (geometry )
{
unsigned int parsedWidth, parsedHeight;
int mask = XParseGeometry( geometry,
"xstaticgray", "xgrayscale", "xstaticcolor", "xpseudocolor",
"xtruecolor", "xdirectcolor",
"xstaticgrey", "xgreyscale", "xstaticcolour", "xpseudocolour",
- "xtruecolour", "xdirectcolour", "borderless"
-};
-
-static int TokenLengths[] =
-{
- 5, 4, 3, 4, 6, 10, 5, 6,
- 5, 5, 3, 3, 4, 3, 9, 7,
- 6, 6, 7, 4, 8, 8, 7,
- 11, 10, 12, 12,
- 10, 12,
- 11, 10, 13, 13,
- 11, 13, 10
+ "xtruecolour", "xdirectcolour", "borderless", "aux"
};
void FGAPIENTRY glutInitDisplayString( const char* displayMode )
int i ;
for ( i = 0; i < NUM_TOKENS; i++ )
{
- if ( strncmp ( token, Tokens[i], TokenLengths[i] ) == 0 ) break ;
+ if ( strcmp ( token, Tokens[i] ) == 0 ) break ;
}
switch ( i )
#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 ;