X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_window.c;h=711defb641b8a488f4eaacb9dbb683b860b1f482;hb=33809048f02c69b63bc8ac4a0fafc7f6eaf4a363;hp=06efa035db28a2fa82ac83aa1b90d4408bb51bee;hpb=c0a9c566efc4ca3c4ea170f9b538c6c16cb481ed;p=freeglut diff --git a/src/fg_window.c b/src/fg_window.c index 06efa03..711defb 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: @@ -145,6 +146,13 @@ void fgOpenWindow( SFG_Window* window, const char* title, glReadBuffer ( GL_FRONT ); } #endif + window->Window.attribute_v_coord = -1; + window->Window.attribute_v_normal = -1; + window->Window.attribute_v_texture = -1; + + fgInitGL2(); + + window->State.NeedToInitContext = GL_TRUE; } /* @@ -319,8 +327,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; @@ -432,9 +438,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; }