correcting a few typos i made earlier in the comments
[freeglut] / src / mswin / fg_window_mswin.c
index 6515063..0698349 100644 (file)
@@ -113,10 +113,8 @@ static wchar_t* fghWstrFromStr(const char* str)
 static void fghFillContextAttributes( int *attributes ) {
   int where = 0, contextFlags, contextProfile;
 
-  if ( !fghIsLegacyContextVersionRequested() ) {
-    ATTRIB_VAL( WGL_CONTEXT_MAJOR_VERSION_ARB, fgState.MajorVersion );
-    ATTRIB_VAL( WGL_CONTEXT_MINOR_VERSION_ARB, fgState.MinorVersion );
-  }
+  ATTRIB_VAL( WGL_CONTEXT_MAJOR_VERSION_ARB, fgState.MajorVersion );
+  ATTRIB_VAL( WGL_CONTEXT_MINOR_VERSION_ARB, fgState.MinorVersion );
 
   contextFlags =
     fghMapBit( fgState.ContextFlags, GLUT_DEBUG, WGL_CONTEXT_DEBUG_BIT_ARB ) |
@@ -163,6 +161,9 @@ void fgNewWGLCreateContext( SFG_Window* window )
 
     if ( !fghIsExtensionSupported( window->Window.pContext.Device, "WGL_ARB_create_context" ) )
     {
+        /* wglCreateContextAttribsARB not found, yet the user has requested the new context creation */
+        fgWarning( "OpenGL >2.1 context requested but wglCreateContextAttribsARB is not available! Falling back to legacy context creation" );
+        /* Legacy context already created at this point in WM_CREATE path of fgPlatformWindowProc, just return */
         return;
     }
 
@@ -172,7 +173,10 @@ void fgNewWGLCreateContext( SFG_Window* window )
     wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress( "wglCreateContextAttribsARB" );
     if ( wglCreateContextAttribsARB == NULL )
     {
-        fgError( "wglCreateContextAttribsARB not found" );
+        /* wglCreateContextAttribsARB not found, yet the user has requested the new context creation */
+        fgWarning( "OpenGL >2.1 context requested but wglCreateContextAttribsARB is not available! Falling back to legacy context creation" );
+        /* Legacy context already created at this point in WM_CREATE path of fgPlatformWindowProc, just return */
+        return;
     }
 
     context = wglCreateContextAttribsARB( window->Window.pContext.Device, 0, attributes );