/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
extern void fgPlatformCreateWindow ( SFG_Window *window );
+extern void fghDefaultReshape(int width, int height);
static void fghClearCallBacks( SFG_Window *window )
{
GLboolean gameMode, GLboolean isMenu )
{
/* Have the window object created */
- SFG_Window *window = (SFG_Window *)calloc( sizeof(SFG_Window), 1 );
+ SFG_Window *window = (SFG_Window *)calloc( 1, sizeof(SFG_Window) );
fgPlatformCreateWindow ( window );
fghClearCallBacks( window );
+ SET_WCB( *window, Reshape, fghDefaultReshape);
/* Initialize the object properties */
window->ID = ++fgStructure.WindowID;
else
fgListAppend( &fgStructure.Windows, &window->Node );
- /* Set the default mouse cursor and reset the modifiers value */
+ /* Set the default mouse cursor */
window->State.Cursor = GLUT_CURSOR_INHERIT;
-
- window->State.IgnoreKeyRepeat = GL_FALSE;
- window->State.KeyRepeating = GL_FALSE;
- window->State.IsFullscreen = GL_FALSE;
- window->State.VisualizeNormals= GL_FALSE;
- window->State.pWState.WindowTitle = NULL;
- window->State.pWState.IconTitle = NULL;
-
- window->IsMenu = isMenu;
+ /* Mark window as menu if a menu is to be created */
+ window->IsMenu = isMenu;
/*
* Open the window now. The fgOpenWindow() function is system