Rewrote the TODO BEFORE THE STABLE RELEASE comment to fit to 80 columns.
Cleanup of fghGetConfig(). (One return statement, simpler code.) Made glutSetOption() have a more consistant style---and also got its lines to stay under 80 columns. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@258 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
3365de2c4a
commit
2abe3abee5
@ -37,8 +37,10 @@
|
|||||||
/*
|
/*
|
||||||
* TODO BEFORE THE STABLE RELEASE:
|
* TODO BEFORE THE STABLE RELEASE:
|
||||||
*
|
*
|
||||||
* glutGet() -- X11 tests passed, but check if all enums handled (what about Win32?)
|
* glutGet() -- X11 tests passed, but check if all enums
|
||||||
* glutDeviceGet() -- X11 tests passed, but check if all enums handled (what about Win32?)
|
* handled (what about Win32?)
|
||||||
|
* glutDeviceGet() -- X11 tests passed, but check if all enums
|
||||||
|
* handled (what about Win32?)
|
||||||
* glutGetModifiers() -- OK, but could also remove the limitation
|
* glutGetModifiers() -- OK, but could also remove the limitation
|
||||||
* glutLayerGet() -- what about GLUT_NORMAL_DAMAGED?
|
* glutLayerGet() -- what about GLUT_NORMAL_DAMAGED?
|
||||||
*
|
*
|
||||||
@ -55,24 +57,13 @@
|
|||||||
*/
|
*/
|
||||||
static int fghGetConfig( int attribute )
|
static int fghGetConfig( int attribute )
|
||||||
{
|
{
|
||||||
int returnValue ;
|
int returnValue = 0;
|
||||||
|
|
||||||
/*
|
if( fgStructure.Window )
|
||||||
* Return nothing if there is no current window set
|
glXGetConfig( fgDisplay.Display, fgStructure.Window->Window.VisualInfo,
|
||||||
*/
|
attribute, &returnValue );
|
||||||
if( fgStructure.Window == NULL )
|
|
||||||
return( 0 );
|
|
||||||
|
|
||||||
/*
|
return returnValue;
|
||||||
* glXGetConfig should work fine
|
|
||||||
*/
|
|
||||||
glXGetConfig( fgDisplay.Display, fgStructure.Window->Window.VisualInfo, attribute, &returnValue );
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Have the query results returned
|
|
||||||
*/
|
|
||||||
return ( returnValue ) ;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -90,26 +81,39 @@ void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
|
|||||||
*/
|
*/
|
||||||
switch( eWhat )
|
switch( eWhat )
|
||||||
{
|
{
|
||||||
case GLUT_INIT_WINDOW_X: fgState.Position.X = (GLint)value ;
|
case GLUT_INIT_WINDOW_X:
|
||||||
break ;
|
fgState.Position.X = (GLint)value;
|
||||||
case GLUT_INIT_WINDOW_Y: fgState.Position.Y = (GLint)value ;
|
break;
|
||||||
break ;
|
|
||||||
case GLUT_INIT_WINDOW_WIDTH: fgState.Size.X = (GLint)value ;
|
|
||||||
break ;
|
|
||||||
case GLUT_INIT_WINDOW_HEIGHT: fgState.Size.Y = (GLint)value ;
|
|
||||||
break ;
|
|
||||||
case GLUT_INIT_DISPLAY_MODE: fgState.DisplayMode = (unsigned int)value ;
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case GLUT_ACTION_ON_WINDOW_CLOSE: fgState.ActionOnWindowClose = value ;
|
case GLUT_INIT_WINDOW_Y:
|
||||||
break ;
|
fgState.Position.Y = (GLint)value;
|
||||||
|
break;
|
||||||
|
|
||||||
case GLUT_RENDERING_CONTEXT: fgState.UseCurrentContext = ( value == GLUT_USE_CURRENT_CONTEXT ) ? TRUE : FALSE ;
|
case GLUT_INIT_WINDOW_WIDTH:
|
||||||
break ;
|
fgState.Size.X = (GLint)value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GLUT_INIT_WINDOW_HEIGHT:
|
||||||
|
fgState.Size.Y = (GLint)value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GLUT_INIT_DISPLAY_MODE:
|
||||||
|
fgState.DisplayMode = (unsigned int)value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GLUT_ACTION_ON_WINDOW_CLOSE:
|
||||||
|
fgState.ActionOnWindowClose = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GLUT_RENDERING_CONTEXT:
|
||||||
|
fgState.UseCurrentContext =
|
||||||
|
( value == GLUT_USE_CURRENT_CONTEXT ) ? TRUE : FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
case GLUT_WINDOW_CURSOR:
|
case GLUT_WINDOW_CURSOR:
|
||||||
if( fgStructure.Window != NULL ) fgStructure.Window->State.Cursor = value ;
|
if( fgStructure.Window != NULL )
|
||||||
break ;
|
fgStructure.Window->State.Cursor = value;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user