X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_init.c;h=ec5b6195622a9edf019e0c1ab563246794820984;hb=34904da12798fd5b88442c816ac8dd7c41edcc33;hp=6b69f9bd518a38cac6440a29d6c196d9e437edc5;hpb=bc0d27e8c973c916fc87fa752e60a9de7d54b55b;p=freeglut diff --git a/src/freeglut_init.c b/src/freeglut_init.c index 6b69f9b..ec5b619 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -59,8 +59,7 @@ SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */ { 300, 300, GL_TRUE }, /* Size */ GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH, /* DisplayMode */ GL_FALSE, /* Initialised */ - GL_FALSE, /* ForceDirectContext */ - GL_TRUE, /* TryDirectContext */ + GLUT_TRY_DIRECT_CONTEXT, /* DirectContext */ GL_FALSE, /* ForceIconic */ GL_FALSE, /* UseCurrentContext */ GL_FALSE, /* GLDebugSwitch */ @@ -176,7 +175,7 @@ void fgInitialize( const char* displayName ) wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW; if (!wc.hIcon) wc.hIcon = LoadIcon( NULL, IDI_WINLOGO ); -#else //TARGET_HOST_WINCE +#else /* TARGET_HOST_WINCE */ wc.style = CS_HREDRAW | CS_VREDRAW; #endif @@ -213,7 +212,7 @@ void fgInitialize( const char* displayName ) #if !TARGET_HOST_WINCE fgJoystickInit( 0 ); fgJoystickInit( 1 ); -#endif //!TARGET_HOST_WINCE +#endif /* !TARGET_HOST_WINCE */ fgState.Initialised = GL_TRUE; } @@ -259,7 +258,7 @@ void fgDeinitialize( void ) #if !TARGET_HOST_WINCE fgJoystickClose( ); -#endif //!TARGET_HOST_WINCE +#endif /* !TARGET_HOST_WINCE */ fgState.Initialised = GL_FALSE; @@ -273,8 +272,7 @@ void fgDeinitialize( void ) fgState.DisplayMode = GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH; - fgState.ForceDirectContext = GL_FALSE; - fgState.TryDirectContext = GL_TRUE; + fgState.DirectContext = GLUT_TRY_DIRECT_CONTEXT; fgState.ForceIconic = GL_FALSE; fgState.UseCurrentContext = GL_FALSE; fgState.GLDebugSwitch = GL_FALSE; @@ -570,21 +568,21 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) } else if( strcmp( argv[ i ], "-direct" ) == 0) { - if( ! fgState.TryDirectContext ) + if( fgState.DirectContext == GLUT_FORCE_INDIRECT_CONTEXT ) fgError( "parameters ambiguity, -direct and -indirect " "cannot be both specified" ); - fgState.ForceDirectContext = GL_TRUE; + fgState.DirectContext = GLUT_FORCE_DIRECT_CONTEXT; argv[ i ] = NULL; ( *pargc )--; } else if( strcmp( argv[ i ], "-indirect" ) == 0 ) { - if( fgState.ForceDirectContext ) + if( fgState.DirectContext == GLUT_FORCE_DIRECT_CONTEXT ) fgError( "parameters ambiguity, -direct and -indirect " "cannot be both specified" ); - fgState.TryDirectContext = GL_FALSE; + fgState.DirectContext = GLUT_FORCE_INDIRECT_CONTEXT; argv[ i ] = NULL; (*pargc)--; } @@ -623,7 +621,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) } } -#endif //TARGET_HOST_WINCE +#endif /* TARGET_HOST_WINCE */ /* * Have the display created now. If there wasn't a "-display"