4 * Various freeglut initialization functions.
6 * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
7 * Written by Pawel W. Olszta, <olszta@sourceforge.net>
8 * Creation date: Thu Dec 2 1999
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 #include <GL/freeglut.h>
29 #include "freeglut_internal.h"
32 * TODO BEFORE THE STABLE RELEASE:
34 * fgDeinitialize() -- Win32's OK, X11 needs the OS-specific
35 * deinitialization done
36 * glutInitDisplayString() -- display mode string parsing
38 * Wouldn't it be cool to use gettext() for error messages? I just love
39 * bash saying "nie znaleziono pliku" instead of "file not found" :)
40 * Is gettext easily portable?
43 /* -- GLOBAL VARIABLES ----------------------------------------------------- */
46 * A structure pointed by g_pDisplay holds all information
47 * regarding the display, screen, root window etc.
49 SFG_Display fgDisplay;
52 * The settings for the current freeglut session
54 SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */
55 { 300, 300, GL_TRUE }, /* Size */
56 GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH, /* DisplayMode */
57 GL_FALSE, /* Initialised */
58 GLUT_TRY_DIRECT_CONTEXT, /* DirectContext */
59 GL_FALSE, /* ForceIconic */
60 GL_FALSE, /* UseCurrentContext */
61 GL_FALSE, /* GLDebugSwitch */
62 GL_FALSE, /* XSyncSwitch */
63 GL_TRUE, /* KeyRepeat */
64 0xffffffff, /* Modifiers */
68 #if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
69 { 0, GL_FALSE }, /* Time */
71 { { 0, 0 }, GL_FALSE },
73 { NULL, NULL }, /* Timers */
74 { NULL, NULL }, /* FreeTimers */
75 NULL, /* IdleCallback */
77 NULL, /* MenuStateCallback */
78 NULL, /* MenuStatusCallback */
79 { 640, 480, GL_TRUE }, /* GameModeSize */
80 16, /* GameModeDepth */
81 72, /* GameModeRefresh */
82 GLUT_ACTION_EXIT, /* ActionOnWindowClose */
83 GLUT_EXEC_STATE_INIT, /* ExecState */
84 NULL, /* ProgramName */
85 GL_FALSE /* JoysticksInitialised */
89 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
92 * A call to this function should initialize all the display stuff...
94 static void fghInitialize( const char* displayName )
96 #if TARGET_HOST_UNIX_X11
97 fgDisplay.Display = XOpenDisplay( displayName );
99 if( fgDisplay.Display == NULL )
100 fgError( "failed to open display '%s'", XDisplayName( displayName ) );
102 if( !glXQueryExtension( fgDisplay.Display, NULL, NULL ) )
103 fgError( "OpenGL GLX extension not supported by display '%s'",
104 XDisplayName( displayName ) );
106 fgDisplay.Screen = DefaultScreen( fgDisplay.Display );
107 fgDisplay.RootWindow = RootWindow(
112 fgDisplay.ScreenWidth = DisplayWidth(
116 fgDisplay.ScreenHeight = DisplayHeight(
121 fgDisplay.ScreenWidthMM = DisplayWidthMM(
125 fgDisplay.ScreenHeightMM = DisplayHeightMM(
130 fgDisplay.Connection = ConnectionNumber( fgDisplay.Display );
132 /* Create the window deletion atom */
133 fgDisplay.DeleteWindow = XInternAtom(
139 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
144 /* What we need to do is to initialize the fgDisplay global structure here. */
145 fgDisplay.Instance = GetModuleHandle( NULL );
147 atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc );
151 ZeroMemory( &wc, sizeof(WNDCLASS) );
154 * Each of the windows should have its own device context, and we
155 * want redraw events during Vertical and Horizontal Resizes by
158 * XXX Old code had "| CS_DBCLCKS" commented out. Plans for the
159 * XXX future? Dead-end idea?
161 wc.lpfnWndProc = fgWindowProc;
164 wc.hInstance = fgDisplay.Instance;
165 wc.hIcon = LoadIcon( fgDisplay.Instance, _T("GLUT_ICON") );
167 #if TARGET_HOST_WIN32
168 wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
170 wc.hIcon = LoadIcon( NULL, IDI_WINLOGO );
171 #else /* TARGET_HOST_WINCE */
172 wc.style = CS_HREDRAW | CS_VREDRAW;
175 wc.hCursor = LoadCursor( NULL, IDC_ARROW );
176 wc.hbrBackground = NULL;
177 wc.lpszMenuName = NULL;
178 wc.lpszClassName = _T("FREEGLUT");
180 /* Register the window class */
181 atom = RegisterClass( &wc );
182 FREEGLUT_INTERNAL_ERROR_EXIT ( atom, "Window Class Not Registered", "fghInitialize" );
185 /* The screen dimensions can be obtained via GetSystemMetrics() calls */
186 fgDisplay.ScreenWidth = GetSystemMetrics( SM_CXSCREEN );
187 fgDisplay.ScreenHeight = GetSystemMetrics( SM_CYSCREEN );
190 HWND desktop = GetDesktopWindow( );
191 HDC context = GetDC( desktop );
193 fgDisplay.ScreenWidthMM = GetDeviceCaps( context, HORZSIZE );
194 fgDisplay.ScreenHeightMM = GetDeviceCaps( context, VERTSIZE );
196 ReleaseDC( desktop, context );
201 fgState.Initialised = GL_TRUE;
205 * Perform the freeglut deinitialization...
207 void fgDeinitialize( void )
211 if( !fgState.Initialised )
213 fgWarning( "fgDeinitialize(): "
214 "no valid initialization has been performed" );
218 /* If there was a menu created, destroy the rendering context */
219 if( fgStructure.MenuContext )
221 free( fgStructure.MenuContext );
222 fgStructure.MenuContext = NULL;
225 fgDestroyStructure( );
227 while( ( timer = fgState.Timers.First) )
229 fgListRemove( &fgState.Timers, &timer->Node );
233 while( ( timer = fgState.FreeTimers.First) )
235 fgListRemove( &fgState.FreeTimers, &timer->Node );
239 #if !TARGET_HOST_WINCE
240 if ( fgState.JoysticksInitialised )
242 #endif /* !TARGET_HOST_WINCE */
243 fgState.JoysticksInitialised = GL_FALSE;
245 fgState.Initialised = GL_FALSE;
247 fgState.Position.X = -1;
248 fgState.Position.Y = -1;
249 fgState.Position.Use = GL_FALSE;
251 fgState.Size.X = 300;
252 fgState.Size.Y = 300;
253 fgState.Size.Use = GL_TRUE;
255 fgState.DisplayMode = GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH;
257 fgState.DirectContext = GLUT_TRY_DIRECT_CONTEXT;
258 fgState.ForceIconic = GL_FALSE;
259 fgState.UseCurrentContext = GL_FALSE;
260 fgState.GLDebugSwitch = GL_FALSE;
261 fgState.XSyncSwitch = GL_FALSE;
262 fgState.ActionOnWindowClose = GLUT_ACTION_EXIT;
263 fgState.ExecState = GLUT_EXEC_STATE_INIT;
265 fgState.KeyRepeat = GL_TRUE;
266 fgState.Modifiers = 0xffffffff;
268 fgState.GameModeSize.X = 640;
269 fgState.GameModeSize.Y = 480;
270 fgState.GameModeDepth = 16;
271 fgState.GameModeRefresh = 72;
273 fgState.Time.Set = GL_FALSE;
275 fgListInit( &fgState.Timers );
276 fgListInit( &fgState.FreeTimers );
278 fgState.IdleCallback = NULL;
279 fgState.MenuStateCallback = ( FGCBMenuState )NULL;
280 fgState.MenuStatusCallback = ( FGCBMenuStatus )NULL;
282 fgState.SwapCount = 0;
283 fgState.SwapTime = 0;
284 fgState.FPSInterval = 0;
286 if( fgState.ProgramName )
288 free( fgState.ProgramName );
289 fgState.ProgramName = NULL;
293 #if TARGET_HOST_UNIX_X11
296 * Make sure all X-client data we have created will be destroyed on
299 XSetCloseDownMode( fgDisplay.Display, DestroyAll );
302 * Close the display connection, destroying all windows we have
305 XCloseDisplay( fgDisplay.Display );
309 fgState.Initialised = GL_FALSE;
313 * Everything inside the following #ifndef is copied from the X sources.
316 #if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
320 Copyright 1985, 1986, 1987,1998 The Open Group
322 Permission to use, copy, modify, distribute, and sell this software and its
323 documentation for any purpose is hereby granted without fee, provided that
324 the above copyright notice appear in all copies and that both that
325 copyright notice and this permission notice appear in supporting
328 The above copyright notice and this permission notice shall be included
329 in all copies or substantial portions of the Software.
331 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
332 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
333 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
334 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
335 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
336 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
337 OTHER DEALINGS IN THE SOFTWARE.
339 Except as contained in this notice, the name of The Open Group shall
340 not be used in advertising or otherwise to promote the sale, use or
341 other dealings in this Software without prior written authorization
346 #define NoValue 0x0000
347 #define XValue 0x0001
348 #define YValue 0x0002
349 #define WidthValue 0x0004
350 #define HeightValue 0x0008
351 #define AllValues 0x000F
352 #define XNegative 0x0010
353 #define YNegative 0x0020
356 * XParseGeometry parses strings of the form
357 * "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
358 * width, height, xoffset, and yoffset are unsigned integers.
359 * Example: "=80x24+300-49"
360 * The equal sign is optional.
361 * It returns a bitmask that indicates which of the four values
362 * were actually found in the string. For each value found,
363 * the corresponding argument is updated; for each value
364 * not found, the corresponding argument is left unchanged.
368 ReadInteger(char *string, char **NextString)
370 register int Result = 0;
375 else if (*string == '-')
380 for (; (*string >= '0') && (*string <= '9'); string++)
382 Result = (Result * 10) + (*string - '0');
384 *NextString = string;
391 static int XParseGeometry (
395 unsigned int *width, /* RETURN */
396 unsigned int *height) /* RETURN */
399 register char *strind;
400 unsigned int tempWidth = 0, tempHeight = 0;
401 int tempX = 0, tempY = 0;
404 if ( (string == NULL) || (*string == '\0'))
407 string++; /* ignore possible '=' at beg of geometry spec */
409 strind = (char *)string;
410 if (*strind != '+' && *strind != '-' && *strind != 'x') {
411 tempWidth = ReadInteger(strind, &nextCharacter);
412 if (strind == nextCharacter)
414 strind = nextCharacter;
418 if (*strind == 'x' || *strind == 'X') {
420 tempHeight = ReadInteger(strind, &nextCharacter);
421 if (strind == nextCharacter)
423 strind = nextCharacter;
427 if ((*strind == '+') || (*strind == '-')) {
428 if (*strind == '-') {
430 tempX = -ReadInteger(strind, &nextCharacter);
431 if (strind == nextCharacter)
433 strind = nextCharacter;
439 tempX = ReadInteger(strind, &nextCharacter);
440 if (strind == nextCharacter)
442 strind = nextCharacter;
445 if ((*strind == '+') || (*strind == '-')) {
446 if (*strind == '-') {
448 tempY = -ReadInteger(strind, &nextCharacter);
449 if (strind == nextCharacter)
451 strind = nextCharacter;
457 tempY = ReadInteger(strind, &nextCharacter);
458 if (strind == nextCharacter)
460 strind = nextCharacter;
466 /* If strind isn't at the end of the string the it's an invalid
467 geometry specification. */
469 if (*strind != '\0') return 0;
475 if (mask & WidthValue)
477 if (mask & HeightValue)
478 *height = tempHeight;
483 /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
486 * Perform initialization. This usually happens on the program startup
487 * and restarting after glutMainLoop termination...
489 void FGAPIENTRY glutInit( int* pargc, char** argv )
491 char* displayName = NULL;
492 char* geometry = NULL;
493 int i, j, argc = *pargc;
495 if( fgState.Initialised )
496 fgError( "illegal glutInit() reinitialization attempt" );
498 if (pargc && *pargc && argv && *argv && **argv)
500 fgState.ProgramName = strdup (*argv);
502 if( !fgState.ProgramName )
503 fgError ("Could not allocate space for the program's name.");
506 fgCreateStructure( );
510 /* check if GLUT_FPS env var is set */
511 #if !TARGET_HOST_WINCE
513 const char *fps = getenv( "GLUT_FPS" );
517 sscanf( fps, "%d", &interval );
520 fgState.FPSInterval = 5000; /* 5000 millisecond default */
522 fgState.FPSInterval = interval;
526 displayName = getenv( "DISPLAY");
528 for( i = 1; i < argc; i++ )
530 if( strcmp( argv[ i ], "-display" ) == 0 )
533 fgError( "-display parameter must be followed by display name" );
535 displayName = argv[ i ];
537 argv[ i - 1 ] = NULL;
541 else if( strcmp( argv[ i ], "-geometry" ) == 0 )
544 fgError( "-geometry parameter must be followed by window "
545 "geometry settings" );
547 geometry = argv[ i ];
549 argv[ i - 1 ] = NULL;
553 else if( strcmp( argv[ i ], "-direct" ) == 0)
555 if( fgState.DirectContext == GLUT_FORCE_INDIRECT_CONTEXT )
556 fgError( "parameters ambiguity, -direct and -indirect "
557 "cannot be both specified" );
559 fgState.DirectContext = GLUT_FORCE_DIRECT_CONTEXT;
563 else if( strcmp( argv[ i ], "-indirect" ) == 0 )
565 if( fgState.DirectContext == GLUT_FORCE_DIRECT_CONTEXT )
566 fgError( "parameters ambiguity, -direct and -indirect "
567 "cannot be both specified" );
569 fgState.DirectContext = GLUT_FORCE_INDIRECT_CONTEXT;
573 else if( strcmp( argv[ i ], "-iconic" ) == 0 )
575 fgState.ForceIconic = GL_TRUE;
579 else if( strcmp( argv[ i ], "-gldebug" ) == 0 )
581 fgState.GLDebugSwitch = GL_TRUE;
585 else if( strcmp( argv[ i ], "-sync" ) == 0 )
587 fgState.XSyncSwitch = GL_TRUE;
593 /* Compact {argv}. */
594 for( i = j = 1; i < *pargc; i++, j++ )
596 /* Guaranteed to end because there are "*pargc" arguments left */
597 while ( argv[ j ] == NULL )
600 argv[ i ] = argv[ j ];
603 #endif /* TARGET_HOST_WINCE */
606 * Have the display created now. If there wasn't a "-display"
607 * in the program arguments, we will use the DISPLAY environment
608 * variable for opening the X display (see code above):
610 fghInitialize( displayName );
613 * Geometry parsing deffered until here because we may need the screen
619 unsigned int parsedWidth, parsedHeight;
620 int mask = XParseGeometry( geometry,
621 &fgState.Position.X, &fgState.Position.Y,
622 &parsedWidth, &parsedHeight );
623 /* TODO: Check for overflow? */
624 fgState.Size.X = parsedWidth;
625 fgState.Size.Y = parsedHeight;
627 if( (mask & (WidthValue|HeightValue)) == (WidthValue|HeightValue) )
628 fgState.Size.Use = GL_TRUE;
630 if( mask & XNegative )
631 fgState.Position.X += fgDisplay.ScreenWidth - fgState.Size.X;
633 if( mask & YNegative )
634 fgState.Position.Y += fgDisplay.ScreenHeight - fgState.Size.Y;
636 if( (mask & (XValue|YValue)) == (XValue|YValue) )
637 fgState.Position.Use = GL_TRUE;
642 * Sets the default initial window position for new windows
644 void FGAPIENTRY glutInitWindowPosition( int x, int y )
646 fgState.Position.X = x;
647 fgState.Position.Y = y;
649 if( ( x >= 0 ) && ( y >= 0 ) )
650 fgState.Position.Use = GL_TRUE;
652 fgState.Position.Use = GL_FALSE;
656 * Sets the default initial window size for new windows
658 void FGAPIENTRY glutInitWindowSize( int width, int height )
660 fgState.Size.X = width;
661 fgState.Size.Y = height;
663 if( ( width > 0 ) && ( height > 0 ) )
664 fgState.Size.Use = GL_TRUE;
666 fgState.Size.Use = GL_FALSE;
670 * Sets the default display mode for all new windows
672 void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode )
674 /* We will make use of this value when creating a new OpenGL context... */
675 fgState.DisplayMode = displayMode;
679 /* -- INIT DISPLAY STRING PARSING ------------------------------------------ */
681 #define NUM_TOKENS 36
682 static char* Tokens[] =
684 "alpha", "acca", "acc", "blue", "buffer", "conformant", "depth", "double",
685 "green", "index", "num", "red", "rgba", "rgb", "luminance", "stencil",
686 "single", "stereo", "samples", "slow", "win32pdf", "win32pfd", "xvisual",
687 "xstaticgray", "xgrayscale", "xstaticcolor", "xpseudocolor",
688 "xtruecolor", "xdirectcolor",
689 "xstaticgrey", "xgreyscale", "xstaticcolour", "xpseudocolour",
690 "xtruecolour", "xdirectcolour", "borderless"
693 static int TokenLengths[] =
695 5, 4, 3, 4, 6, 10, 5, 6,
696 5, 5, 3, 3, 4, 3, 9, 7,
704 void FGAPIENTRY glutInitDisplayString( const char* displayMode )
706 int glut_state_flag = 0 ;
708 * Unpack a lot of options from a character string. The options are
709 * delimited by blanks or tabs.
712 int len = strlen ( displayMode );
713 char *buffer = (char *)malloc ( (len+1) * sizeof(char) );
714 memcpy ( buffer, displayMode, len );
717 token = strtok ( buffer, " \t" );
720 /* Process this token */
722 for ( i = 0; i < NUM_TOKENS; i++ )
724 if ( strncmp ( token, Tokens[i], TokenLengths[i] ) == 0 ) break ;
729 case 0 : /* "alpha": Alpha color buffer precision in bits */
730 glut_state_flag |= GLUT_ALPHA ; /* Somebody fix this for me! */
733 case 1 : /* "acca": Red, green, blue, and alpha accumulation buffer
737 case 2 : /* "acc": Red, green, and blue accumulation buffer precision
738 in bits with zero bits alpha */
739 glut_state_flag |= GLUT_ACCUM ; /* Somebody fix this for me! */
742 case 3 : /* "blue": Blue color buffer precision in bits */
745 case 4 : /* "buffer": Number of bits in the color index color buffer
749 case 5 : /* "conformant": Boolean indicating if the frame buffer
750 configuration is conformant or not */
753 case 6 : /* "depth": Number of bits of precsion in the depth buffer */
754 glut_state_flag |= GLUT_DEPTH ; /* Somebody fix this for me! */
757 case 7 : /* "double": Boolean indicating if the color buffer is
759 glut_state_flag |= GLUT_DOUBLE ;
762 case 8 : /* "green": Green color buffer precision in bits */
765 case 9 : /* "index": Boolean if the color model is color index or not
767 glut_state_flag |= GLUT_INDEX ;
770 case 10 : /* "num": A special capability name indicating where the
771 value represents the Nth frame buffer configuration
772 matching the description string */
775 case 11 : /* "red": Red color buffer precision in bits */
778 case 12 : /* "rgba": Number of bits of red, green, blue, and alpha in
779 the RGBA color buffer */
780 glut_state_flag |= GLUT_RGBA ; /* Somebody fix this for me! */
783 case 13 : /* "rgb": Number of bits of red, green, and blue in the
784 RGBA color buffer with zero bits alpha */
785 glut_state_flag |= GLUT_RGB ; /* Somebody fix this for me! */
788 case 14 : /* "luminance": Number of bits of red in the RGBA and zero
789 bits of green, blue (alpha not specified) of color buffer
791 glut_state_flag |= GLUT_LUMINANCE ; /* Somebody fix this for me! */
794 case 15 : /* "stencil": Number of bits in the stencil buffer */
795 glut_state_flag |= GLUT_STENCIL; /* Somebody fix this for me! */
798 case 16 : /* "single": Boolean indicate the color buffer is single
800 glut_state_flag |= GLUT_SINGLE ;
803 case 17 : /* "stereo": Boolean indicating the color buffer supports
804 OpenGL-style stereo */
805 glut_state_flag |= GLUT_STEREO ;
808 case 18 : /* "samples": Indicates the number of multisamples to use
809 based on GLX's SGIS_multisample extension (for
811 glut_state_flag |= GLUT_MULTISAMPLE ; /*Somebody fix this for me!*/
814 case 19 : /* "slow": Boolean indicating if the frame buffer
815 configuration is slow or not */
818 case 20 : /* "win32pdf": (incorrect spelling but was there before */
819 case 21 : /* "win32pfd": matches the Win32 Pixel Format Descriptor by
821 #if TARGET_HOST_WIN32
825 case 22 : /* "xvisual": matches the X visual ID by number */
826 #if TARGET_HOST_UNIX_X11
830 case 23 : /* "xstaticgray": */
831 case 29 : /* "xstaticgrey": boolean indicating if the frame buffer
832 configuration's X visual is of type StaticGray */
833 #if TARGET_HOST_UNIX_X11
837 case 24 : /* "xgrayscale": */
838 case 30 : /* "xgreyscale": boolean indicating if the frame buffer
839 configuration's X visual is of type GrayScale */
840 #if TARGET_HOST_UNIX_X11
844 case 25 : /* "xstaticcolor": */
845 case 31 : /* "xstaticcolour": boolean indicating if the frame buffer
846 configuration's X visual is of type StaticColor */
847 #if TARGET_HOST_UNIX_X11
851 case 26 : /* "xpseudocolor": */
852 case 32 : /* "xpseudocolour": boolean indicating if the frame buffer
853 configuration's X visual is of type PseudoColor */
854 #if TARGET_HOST_UNIX_X11
858 case 27 : /* "xtruecolor": */
859 case 33 : /* "xtruecolour": boolean indicating if the frame buffer
860 configuration's X visual is of type TrueColor */
861 #if TARGET_HOST_UNIX_X11
865 case 28 : /* "xdirectcolor": */
866 case 34 : /* "xdirectcolour": boolean indicating if the frame buffer
867 configuration's X visual is of type DirectColor */
868 #if TARGET_HOST_UNIX_X11
872 case 35 : /* "borderless": windows should not have borders */
873 #if TARGET_HOST_UNIX_X11
877 case 36 : /* Unrecognized */
878 fgWarning ( "WARNING - Display string token not recognized: %s",
883 token = strtok ( NULL, " \t" );
888 /* We will make use of this value when creating a new OpenGL context... */
889 fgState.DisplayMode = glut_state_flag;
892 /*** END OF FILE ***/