projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
All changes are from John, except for:
[freeglut]
/
src
/
freeglut_state.c
diff --git
a/src/freeglut_state.c
b/src/freeglut_state.c
index
70d7eaf
..
5e4ad04
100644
(file)
--- a/
src/freeglut_state.c
+++ b/
src/freeglut_state.c
@@
-29,8
+29,6
@@
#include "config.h"
#endif
#include "config.h"
#endif
-#define G_LOG_DOMAIN "freeglut-state"
-
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
@@
-107,7
+105,7
@@
void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
case GLUT_RENDERING_CONTEXT:
fgState.UseCurrentContext =
case GLUT_RENDERING_CONTEXT:
fgState.UseCurrentContext =
- ( value == GLUT_USE_CURRENT_CONTEXT ) ? TRUE : FALSE;
+ ( value == GLUT_USE_CURRENT_CONTEXT ) ? GL_TRUE : GL_FALSE;
break;
case GLUT_WINDOW_CURSOR:
break;
case GLUT_WINDOW_CURSOR:
@@
-126,11
+124,19
@@
void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
*/
int FGAPIENTRY glutGet( GLenum eWhat )
{
*/
int FGAPIENTRY glutGet( GLenum eWhat )
{
+#if TARGET_HOST_WIN32
int returnValue ;
GLboolean boolValue ;
int returnValue ;
GLboolean boolValue ;
+#endif
+
+ switch (eWhat)
+ {
+ case GLUT_INIT_STATE:
+ return ( fgState.Initialised ) ;
- if ( eWhat == GLUT_INIT_STATE )
- return ( fgState.Time.Set ) ;
+ case GLUT_ELAPSED_TIME:
+ return( fgElapsedTime() );
+ }
freeglut_assert_ready;
freeglut_assert_ready;
@@
-139,9
+145,6
@@
int FGAPIENTRY glutGet( GLenum eWhat )
*/
switch( eWhat )
{
*/
switch( eWhat )
{
- case GLUT_ELAPSED_TIME:
- return( fgElapsedTime() );
-
/*
* Following values are stored in fgState and fgDisplay global structures
*/
/*
* Following values are stored in fgState and fgDisplay global structures
*/
@@
-399,7
+402,8
@@
int FGAPIENTRY glutGet( GLenum eWhat )
return ( GetSystemMetrics( SM_CYCAPTION ) ) ;
case GLUT_DISPLAY_MODE_POSSIBLE:
return ( GetSystemMetrics( SM_CYCAPTION ) ) ;
case GLUT_DISPLAY_MODE_POSSIBLE:
- return( fgSetupPixelFormat( fgStructure.Window, TRUE, PFD_MAIN_PLANE ) );
+ return( fgSetupPixelFormat( fgStructure.Window, GL_TRUE,
+ PFD_MAIN_PLANE ) );
case GLUT_WINDOW_FORMAT_ID:
if( fgStructure.Window != NULL )
case GLUT_WINDOW_FORMAT_ID:
if( fgStructure.Window != NULL )
@@
-560,16
+564,13
@@
int FGAPIENTRY glutDeviceGet( GLenum eWhat )
*/
int FGAPIENTRY glutGetModifiers( void )
{
*/
int FGAPIENTRY glutGetModifiers( void )
{
- if( fgStructure.Window == NULL )
- return( 0 );
-
- if( fgStructure.Window->State.Modifiers == 0xffffffff )
+ if( fgState.Modifiers == 0xffffffff )
{
fgWarning( "glutGetModifiers() called outside an input callback" );
return( 0 );
}
{
fgWarning( "glutGetModifiers() called outside an input callback" );
return( 0 );
}
- return( fgStructure.Window->State.Modifiers );
+ return( fgState.Modifiers );
}
/*
}
/*
@@
-619,7
+620,8
@@
int FGAPIENTRY glutLayerGet( GLenum eWhat )
#elif TARGET_HOST_WIN32
case GLUT_OVERLAY_POSSIBLE:
#elif TARGET_HOST_WIN32
case GLUT_OVERLAY_POSSIBLE:
-/* return( fgSetupPixelFormat( fgStructure.Window, TRUE, PFD_OVERLAY_PLANE ) ); */
+/* return( fgSetupPixelFormat( fgStructure.Window, GL_TRUE,
+ PFD_OVERLAY_PLANE ) ); */
return FALSE ;
case GLUT_LAYER_IN_USE:
return FALSE ;
case GLUT_LAYER_IN_USE: