projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moving the platform-specific window state fields into their own substructure
[freeglut]
/
src
/
Common
/
freeglut_structure.c
diff --git
a/src/Common/freeglut_structure.c
b/src/Common/freeglut_structure.c
index
4ae0e1f
..
59a8b83
100644
(file)
--- a/
src/Common/freeglut_structure.c
+++ b/
src/Common/freeglut_structure.c
@@
-48,6
+48,8
@@
SFG_Structure fgStructure = { { NULL, NULL }, /* The list of windows */
\r
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
\r
\r
\r
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
\r
\r
+extern void fgPlatformCreateWindow ( SFG_Window *window );
\r
+
\r
static void fghClearCallBacks( SFG_Window *window )
\r
{
\r
if( window )
\r
static void fghClearCallBacks( SFG_Window *window )
\r
{
\r
if( window )
\r
@@
-58,6
+60,15
@@
static void fghClearCallBacks( SFG_Window *window )
}
\r
}
\r
\r
}
\r
}
\r
\r
+#if TARGET_HOST_POSIX_X11
\r
+void fgPlatformCreateWindow ( SFG_Window *window )
\r
+{
\r
+ window->Window.pContext.FBConfig = NULL;
\r
+
\r
+ window->State.pWState.OldHeight = window->State.pWState.OldWidth = -1;
\r
+}
\r
+#endif
\r
+
\r
/*
\r
* This private function creates, opens and adds to the hierarchy
\r
* a freeglut window complete with OpenGL context and stuff...
\r
/*
\r
* This private function creates, opens and adds to the hierarchy
\r
* a freeglut window complete with OpenGL context and stuff...
\r
@@
-72,16
+83,12
@@
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
/* Have the window object created */
\r
SFG_Window *window = (SFG_Window *)calloc( sizeof(SFG_Window), 1 );
\r
\r
/* Have the window object created */
\r
SFG_Window *window = (SFG_Window *)calloc( sizeof(SFG_Window), 1 );
\r
\r
-#if TARGET_HOST_UNIX_X11
\r
- window->Window.FBConfig = NULL;
\r
-#endif
\r
+ fgPlatformCreateWindow ( window );
\r
+
\r
fghClearCallBacks( window );
\r
\r
/* Initialize the object properties */
\r
window->ID = ++fgStructure.WindowID;
\r
fghClearCallBacks( window );
\r
\r
/* Initialize the object properties */
\r
window->ID = ++fgStructure.WindowID;
\r
-#if TARGET_HOST_POSIX_X11
\r
- window->State.OldHeight = window->State.OldWidth = -1;
\r
-#endif
\r
\r
fgListInit( &window->Children );
\r
if( parent )
\r
\r
fgListInit( &window->Children );
\r
if( parent )
\r