X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fx11%2Ffg_window_x11_glx.c;h=eccf1d1c718ee9bf4c390c6c8cd9aa20a71cb836;hb=HEAD;hp=316c74e55e229a0e6faa5566ccc189eb69cc6106;hpb=6affa9c301ebc731618321b565fbdacb760128ce;p=freeglut diff --git a/src/x11/fg_window_x11_glx.c b/src/x11/fg_window_x11_glx.c index 316c74e..eccf1d1 100644 --- a/src/x11/fg_window_x11_glx.c +++ b/src/x11/fg_window_x11_glx.c @@ -115,7 +115,7 @@ int fghChooseConfig(GLXFBConfig* fbconfig) if (fbconfigArray != NULL) { - int result; /* Returned by glXGetFBConfigAttrib, not checked. */ + int result __fg_unused; /* Returned by glXGetFBConfigAttrib, not checked. */ if( wantIndexedMode ) @@ -177,10 +177,8 @@ int fghChooseConfig(GLXFBConfig* fbconfig) static void fghFillContextAttributes( int *attributes ) { int where = 0, contextFlags, contextProfile; - if ( !fghIsLegacyContextVersionRequested() ) { - ATTRIB_VAL( GLX_CONTEXT_MAJOR_VERSION_ARB, fgState.MajorVersion ); - ATTRIB_VAL( GLX_CONTEXT_MINOR_VERSION_ARB, fgState.MinorVersion ); - } + ATTRIB_VAL( GLX_CONTEXT_MAJOR_VERSION_ARB, fgState.MajorVersion ); + ATTRIB_VAL( GLX_CONTEXT_MINOR_VERSION_ARB, fgState.MinorVersion ); contextFlags = fghMapBit( fgState.ContextFlags, GLUT_DEBUG, GLX_CONTEXT_DEBUG_BIT_ARB ) | @@ -222,14 +220,14 @@ GLXContext fghCreateNewContext( SFG_Window* window ) CreateContextAttribsProc createContextAttribs = (CreateContextAttribsProc) fgPlatformGetProcAddress( "glXCreateContextAttribsARB" ); /* glXCreateContextAttribsARB not found, yet the user has requested the new context creation */ - if ( !createContextAttribs && !fghIsLegacyContextRequested() ) { + if ( !createContextAttribs && !fghIsLegacyContextRequested(window) ) { fgWarning( "OpenGL >2.1 context requested but glXCreateContextAttribsARB is not available! Falling back to legacy context creation" ); fgState.MajorVersion = 2; fgState.MinorVersion = 1; } /* If nothing fancy has been required, simply use the old context creation GLX API entry */ - if ( fghIsLegacyContextRequested() || !createContextAttribs ) + if ( fghIsLegacyContextRequested(window) || !createContextAttribs ) { context = glXCreateNewContext( dpy, config, render_type, share_list, direct ); if ( context == NULL ) {