#define ATTRIB(a) attributes[where++]=(a)
#define ATTRIB_VAL(a,v) {ATTRIB(a); ATTRIB(v);}
-int fghIsLegacyContextVersionRequested( void );
int fghMapBit( int mask, int from, int to );
int fghIsLegacyContextRequested( void );
void fghContextCreationError( void );
/* -- 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 )
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 ) |
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 ) |