projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
freeglut_assert_ready is going to have to go at some point.
[freeglut]
/
src
/
freeglut_internal.h
diff --git
a/src/freeglut_internal.h
b/src/freeglut_internal.h
index
ea311b6
..
ea75e84
100644
(file)
--- a/
src/freeglut_internal.h
+++ b/
src/freeglut_internal.h
@@
-198,13
+198,15
@@
struct tagSFG_Time
};
/*
};
/*
- * An enumeration containing the state of the GLUT execution: initializing, running, or stopping
+ * An enumeration containing the state of the GLUT execution:
+ * initializing, running, or stopping
*/
*/
-typedef enum {
- GLUT_EXEC_STATE_INIT,
- GLUT_EXEC_STATE_RUNNING,
- GLUT_EXEC_STATE_STOP
-} fgExecutionState ;
+typedef enum
+{
+ GLUT_EXEC_STATE_INIT,
+ GLUT_EXEC_STATE_RUNNING,
+ GLUT_EXEC_STATE_STOP
+} fgExecutionState;
/*
* This structure holds different freeglut settings
/*
* This structure holds different freeglut settings
@@
-216,6
+218,8
@@
struct tagSFG_State
SFG_XYUse Size; /* The default windows' size */
unsigned int DisplayMode; /* Display mode for new windows */
SFG_XYUse Size; /* The default windows' size */
unsigned int DisplayMode; /* Display mode for new windows */
+ GLboolean Initalized; /* Freeglut has been initalized */
+
GLboolean ForceDirectContext; /* Force direct rendering? */
GLboolean TryDirectContext; /* What about giving a try to? */
GLboolean ForceDirectContext; /* Force direct rendering? */
GLboolean TryDirectContext; /* What about giving a try to? */
@@
-363,8
+367,7
@@
struct tagSFG_WindowState
* {Visibility} is the window-specific callback to fetch.
*
* The result is correctly type-cast to the callback function pointer
* {Visibility} is the window-specific callback to fetch.
*
* The result is correctly type-cast to the callback function pointer
- * type. (This is accomlished by abutting the callback name to a
- * common prefix, using ANSI C token-pasting.)
+ * type.
*/
#define FETCH_WCB(window,cbname) \
((FGCB ## cbname)((window).CallBacks[CB_ ## cbname]))
*/
#define FETCH_WCB(window,cbname) \
((FGCB ## cbname)((window).CallBacks[CB_ ## cbname]))
@@
-528,12
+531,12
@@
struct tagSFG_Window
/*
* A linked list structure of windows
*/
/*
* A linked list structure of windows
*/
-typedef struct tagSFG_WindowList SFG_WindowList ;
+typedef struct tagSFG_WindowList SFG_WindowList;
struct tagSFG_WindowList
{
struct tagSFG_WindowList
{
- SFG_Window *window ;
- GLboolean needToClose ;
- SFG_WindowList *next ;
+ SFG_Window *window;
+ GLboolean needToClose;
+ SFG_WindowList *next;
};
/*
};
/*
@@
-642,7
+645,7
@@
extern SFG_State fgState;
* A call to this function makes us sure that the Display and Structure
* subsystems have been properly initialized and are ready to be used
*/
* A call to this function makes us sure that the Display and Structure
* subsystems have been properly initialized and are ready to be used
*/
-#define freeglut_assert_ready assert( fgState.Time.Set );
+#define freeglut_assert_ready assert( fgState.Initalized );
/*
* Following definitions are somewhat similiar to GLib's,
/*
* Following definitions are somewhat similiar to GLib's,
@@
-653,7
+656,7
@@
extern SFG_State fgState;
return;
#define freeglut_return_val_if_fail( expr, val ) \
if( !(expr) ) \
return;
#define freeglut_return_val_if_fail( expr, val ) \
if( !(expr) ) \
- return( val );
+ return val;
/*
* A call to those macros assures us that there is a current
/*
* A call to those macros assures us that there is a current
@@
-703,14
+706,14
@@
GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
*/
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
int x, int y, int w, int h, GLboolean gameMode );
*/
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
int x, int y, int w, int h, GLboolean gameMode );
-void fgSetWindow ( SFG_Window *window ) ;
+void fgSetWindow ( SFG_Window *window );
void fgOpenWindow( SFG_Window* window, const char* title,
int x, int y, int w, int h, GLboolean gameMode,
void fgOpenWindow( SFG_Window* window, const char* title,
int x, int y, int w, int h, GLboolean gameMode,
- int isSubWindow );
+ GLboolean isSubWindow );
void fgCloseWindow( SFG_Window* window );
void fgAddToWindowDestroyList ( SFG_Window* window,
void fgCloseWindow( SFG_Window* window );
void fgAddToWindowDestroyList ( SFG_Window* window,
- GLboolean needToClose ) ;
-void fgCloseWindows ();
+ GLboolean needToClose );
+void fgCloseWindows( );
void fgDestroyWindow( SFG_Window* window, GLboolean needToClose );
void fgClearCallBacks( SFG_Window *window );
void fgDestroyWindow( SFG_Window* window, GLboolean needToClose );
void fgClearCallBacks( SFG_Window *window );