OpenGL2: Disable r_cubeMapping if not OpenGL 3.0+

r_cubeMapping requires textureCubeLod() which is only in OpenGL 3.0
(GLSL 1.30) and later. It's not in OpenGL ES 3.0 / GLSL ES 3.00.
This needs to be checked before R_InitImages() so can't just check in
GLSL_InitGPUShaders().
This commit is contained in:
Zack Middleton 2019-04-16 11:46:18 -05:00
parent 9fcb2bb336
commit d13d06424e

View file

@ -285,6 +285,12 @@ static void InitOpenGL( void )
}
}
// check for GLSL function textureCubeLod()
if ( r_cubeMapping->integer && !QGL_VERSION_ATLEAST( 3, 0 ) ) {
ri.Printf( PRINT_WARNING, "WARNING: Disabled r_cubeMapping because it requires OpenGL 3.0\n" );
ri.Cvar_Set( "r_cubeMapping", "0" );
}
// set default state
GL_SetDefaultState();
}