X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_window.c;h=3b61192dd150f17c862060e4801570d32079e600;hb=56cc35535901ef071bf8acab59ba176355ee3e0e;hp=e7f9275688ba8baeb04e30fca1a0b162a6b07184;hpb=1b5ee849ba61b667aeba474a7e03406196478bee;p=freeglut diff --git a/src/fg_window.c b/src/fg_window.c index e7f9275..3b61192 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: @@ -70,16 +71,9 @@ extern void fgPlatformGlutFullScreenToggle( SFG_Window *win ); /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ -int fghIsLegacyContextVersionRequested( void ) -{ - return fgState.MajorVersion < 2 || (fgState.MajorVersion == 2 && fgState.MinorVersion <= 1); -} - int fghIsLegacyContextRequested( void ) { - return fghIsLegacyContextVersionRequested() && - fgState.ContextFlags == 0 && - fgState.ContextProfile == 0; + return fgState.MajorVersion < 2 || (fgState.MajorVersion == 2 && fgState.MinorVersion <= 1); } int fghNumberOfAuxBuffersRequested( void ) @@ -152,6 +146,12 @@ void fgOpenWindow( SFG_Window* window, const char* title, glReadBuffer ( GL_FRONT ); } #endif + window->Window.attribute_v_coord = -1; + window->Window.attribute_v_normal = -1; + + fgInitGL2(); + + window->State.NeedToInitContext = GL_TRUE; } /* @@ -326,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;