X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_window.c;h=ad151cfacd4359877a2c08c3bb979af4c2a32105;hb=ff7ec6ed2620d67541b5a29dab54c5459e5183c3;hp=9a980f8ad63440edce37afb318f762174b405e6e;hpb=39c957d9929f0aba775c4a07a70b6124bc4b50e6;p=freeglut diff --git a/src/fg_window.c b/src/fg_window.c index 9a980f8..ad151cf 100644 --- a/src/fg_window.c +++ b/src/fg_window.c @@ -28,6 +28,7 @@ #define FREEGLUT_BUILDING_LIB #include #include "fg_internal.h" +#include "fg_gl2.h" /* * TODO BEFORE THE STABLE RELEASE: @@ -147,6 +148,10 @@ void fgOpenWindow( SFG_Window* window, const char* title, #endif window->Window.attribute_v_coord = -1; window->Window.attribute_v_normal = -1; + + fgInitGL2(); + + window->State.NeedToInitContext = GL_TRUE; } /* @@ -321,8 +326,6 @@ void FGAPIENTRY glutIconifyWindow( void ) FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutIconifyWindow" ); FREEGLUT_EXIT_IF_NO_WINDOW ( "glutIconifyWindow" ); - fgStructure.CurrentWindow->State.Visible = GL_FALSE; - fgPlatformGlutIconifyWindow (); fgStructure.CurrentWindow->State.Redisplay = GL_FALSE; @@ -434,9 +437,11 @@ void FGAPIENTRY glutFullScreen( void ) fgWarning("glutFullScreen called on a child window, ignoring..."); return; } - else if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==win->ID) + else if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==win->ID && win->State.IsFullscreen) { - /* Ignore fullscreen call on GameMode window, those are always fullscreen already */ + /* Ignore fullscreen call on GameMode window, those are always fullscreen already + * only exception is during first entering GameMode + */ return; }