Don't try to create an OpenGL 5.0 context ...

This commit is contained in:
Robert Beckebans 2020-03-28 17:53:39 +01:00
parent bf59190a7c
commit f97bfe3eb4

View file

@ -353,8 +353,8 @@ static HGLRC CreateOpenGLContextOnDC( const HDC hdc, const bool debugContext )
for( int i = 0; i < 2; i++ )
{
const int glMajorVersion = ( useCoreProfile != 0 ) ? 4 : 5;
const int glMinorVersion = ( useCoreProfile != 0 ) ? 4 : 0;
const int glMajorVersion = ( useCoreProfile != 0 ) ? 4 : 4;
const int glMinorVersion = ( useCoreProfile != 0 ) ? 5 : 3;
const int glDebugFlag = debugContext ? WGL_CONTEXT_DEBUG_BIT_ARB : 0;
const int glProfileMask = ( useCoreProfile != 0 ) ? WGL_CONTEXT_PROFILE_MASK_ARB : 0;
const int glProfile = ( useCoreProfile == 1 ) ? WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB : ( ( useCoreProfile == 2 ) ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : 0 );
@ -389,7 +389,7 @@ static HGLRC CreateOpenGLContextOnDC( const HDC hdc, const bool debugContext )
}
idLib::Printf( "failed to create OpenGL %d.%d context\n", glMajorVersion, glMinorVersion );
useCoreProfile = 0; // fall back to OpenGL 2.0
useCoreProfile = 0; // fall back to OpenGL 4.3
}
if( m_hrc == NULL )