mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Don't check fixed function GL extensions when using shader pipeline
GL_TEXTURE_UNITS_ARB is not part of OpenGL ES 2 API and sets GL error. It's not part of OpenGL 3.2 core profile either.
This commit is contained in:
parent
d861a4f427
commit
658165cfbb
2 changed files with 77 additions and 69 deletions
|
@ -261,6 +261,8 @@ static void InitOpenGL( void )
|
|||
GLimp_Init( qfalse );
|
||||
GLimp_InitExtraExtensions();
|
||||
|
||||
glConfig.textureEnvAddAvailable = qtrue;
|
||||
|
||||
// OpenGL driver constants
|
||||
qglGetIntegerv( GL_MAX_TEXTURE_SIZE, &temp );
|
||||
glConfig.maxTextureSize = temp;
|
||||
|
@ -270,6 +272,9 @@ static void InitOpenGL( void )
|
|||
{
|
||||
glConfig.maxTextureSize = 0;
|
||||
}
|
||||
|
||||
qglGetIntegerv( GL_MAX_TEXTURE_IMAGE_UNITS, &temp );
|
||||
glConfig.numTextureUnits = temp;
|
||||
}
|
||||
|
||||
// set default state
|
||||
|
@ -1044,7 +1049,7 @@ void GfxInfo_f( void )
|
|||
}
|
||||
ri.Printf( PRINT_ALL, "\n" );
|
||||
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );
|
||||
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_UNITS_ARB: %d\n", glConfig.numTextureUnits );
|
||||
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_IMAGE_UNITS: %d\n", glConfig.numTextureUnits );
|
||||
ri.Printf( PRINT_ALL, "\nPIXELFORMAT: color(%d-bits) Z(%d-bit) stencil(%d-bits)\n", glConfig.colorBits, glConfig.depthBits, glConfig.stencilBits );
|
||||
ri.Printf( PRINT_ALL, "MODE: %d, %d x %d %s hz:", r_mode->integer, glConfig.vidWidth, glConfig.vidHeight, fsstrings[r_fullscreen->integer == 1] );
|
||||
if ( glConfig.displayFrequency )
|
||||
|
|
|
@ -802,7 +802,7 @@ static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qbool
|
|||
GLimp_InitExtensions
|
||||
===============
|
||||
*/
|
||||
static void GLimp_InitExtensions( void )
|
||||
static void GLimp_InitExtensions( qboolean fixedFunction )
|
||||
{
|
||||
if ( !r_allowExtensions->integer )
|
||||
{
|
||||
|
@ -854,7 +854,9 @@ static void GLimp_InitExtensions( void )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// OpenGL 1 fixed function pipeline
|
||||
if ( fixedFunction )
|
||||
{
|
||||
// GL_EXT_texture_env_add
|
||||
glConfig.textureEnvAddAvailable = qfalse;
|
||||
if ( SDL_GL_ExtensionSupported( "GL_EXT_texture_env_add" ) )
|
||||
|
@ -937,6 +939,7 @@ static void GLimp_InitExtensions( void )
|
|||
{
|
||||
ri.Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" );
|
||||
}
|
||||
}
|
||||
|
||||
textureFilterAnisotropic = qfalse;
|
||||
if ( SDL_GL_ExtensionSupported( "GL_EXT_texture_filter_anisotropic" ) )
|
||||
|
@ -1064,7 +1067,7 @@ success:
|
|||
}
|
||||
|
||||
// initialize extensions
|
||||
GLimp_InitExtensions( );
|
||||
GLimp_InitExtensions( fixedFunction );
|
||||
|
||||
ri.Cvar_Get( "r_availableModes", "", CVAR_ROM );
|
||||
|
||||
|
|
Loading…
Reference in a new issue