mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-08 11:38:01 +03:00
Added compressed textures support
This commit is contained in:
parent
55ad4dacdd
commit
c660e0162f
4 changed files with 38 additions and 47 deletions
|
@ -970,11 +970,13 @@ static void GLW_InitExtensions( void )
|
|||
ri.Printf( PRINT_ALL, "Initializing OpenGL extensions\n" );
|
||||
|
||||
// GL_S3_s3tc
|
||||
qglCompressedTexImage2DARB = NULL;
|
||||
glConfig.textureCompression = TC_NONE;
|
||||
if ( strstr( glConfig.extensions_string, "GL_S3_s3tc" ) )
|
||||
if ( strstr( glConfig.extensions_string, "GL_EXT_texture_compression_s3tc" ) && strstr(glConfig.extensions_string, "GL_ARB_texture_compression"))
|
||||
{
|
||||
if ( r_ext_compressed_textures->integer )
|
||||
{
|
||||
qglCompressedTexImage2DARB = wglGetProcAddress("glCompressedTexImage2DARB");
|
||||
glConfig.textureCompression = TC_S3TC;
|
||||
ri.Printf( PRINT_ALL, "...using GL_S3_s3tc\n" );
|
||||
}
|
||||
|
@ -984,9 +986,18 @@ static void GLW_InitExtensions( void )
|
|||
ri.Printf( PRINT_ALL, "...ignoring GL_S3_s3tc\n" );
|
||||
}
|
||||
}
|
||||
else if (!strstr(glConfig.extensions_string, "GL_EXT_texture_compression_s3tc"))
|
||||
{
|
||||
ri.Printf(PRINT_ALL, "...GL_ARB_texture_compression not found\n");
|
||||
}
|
||||
else if (strstr(glConfig.extensions_string, "GL_ARB_texture_compression"))
|
||||
{
|
||||
ri.Printf(PRINT_ALL, "...GL_EXT_texture_compression_s3tc not found\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ri.Printf( PRINT_ALL, "...GL_S3_s3tc not found\n" );
|
||||
ri.Printf(PRINT_ALL, "...GL_EXT_texture_compression_s3tc not found\n");
|
||||
ri.Printf(PRINT_ALL, "...GL_ARB_texture_compression not found\n");
|
||||
}
|
||||
|
||||
// GL_EXT_texture_env_add
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue