From 005094d39f4371eb7fa09671ab6b067c0caf0c22 Mon Sep 17 00:00:00 2001 From: tma Date: Sat, 22 Apr 2006 22:14:15 +0000 Subject: * Anisotropic texture filtering (from Echon) git-svn-id: svn://svn.icculus.org/quake3/trunk@719 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/win32/win_glimp.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'code/win32/win_glimp.c') diff --git a/code/win32/win_glimp.c b/code/win32/win_glimp.c index 4f97f04..f9b1289 100644 --- a/code/win32/win_glimp.c +++ b/code/win32/win_glimp.c @@ -1111,6 +1111,31 @@ static void GLW_InitExtensions( void ) { ri.Printf( PRINT_ALL, "...WGL_3DFX_gamma_control not found\n" ); } + + glConfig.textureFilterAnisotropic = qfalse; + if ( strstr( glConfig.extensions_string, "GL_EXT_texture_filter_anisotropic" ) ) + { + if ( r_ext_texture_filter_anisotropic->integer ) { + qglGetIntegerv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glConfig.maxAnisotropy ); + if ( glConfig.maxAnisotropy <= 0 ) { + ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not properly supported!\n" ); + glConfig.maxAnisotropy = 0; + } + else + { + ri.Printf( PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic (max: %i)\n", glConfig.maxAnisotropy ); + glConfig.textureFilterAnisotropic = qtrue; + } + } + else + { + ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n" ); + } + } + else + { + ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" ); + } } /* -- cgit v1.2.3