diff --git a/engine/gl/gl_vidcommon.c b/engine/gl/gl_vidcommon.c index 2a732554..74cb4d0d 100644 --- a/engine/gl/gl_vidcommon.c +++ b/engine/gl/gl_vidcommon.c @@ -128,6 +128,7 @@ lpMTexFUNC qglMTexCoord2fSGIS; lpSelTexFUNC qglSelectTextureSGIS; int mtexid0; int mtexid1; +int gl_anisotropy_factor_max; //ati_truform PFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI; @@ -225,6 +226,17 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name)) gl_config.arb_shader_objects = false; + gl_config.ext_texture_filter_anisotropic = false; + + if (strstr(gl_extensions, "GL_EXT_texture_filter_anisotropic")) + { + gl_config.ext_texture_filter_anisotropic = true; + + qglGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_anisotropy_factor_max); + + Con_SafePrintf("Anistropic filter extension found (%dx max).\n",gl_anisotropy_factor_max); + } + if (strstr(gl_extensions, "GL_ARB_texture_non_power_of_two")) gl_config.arb_texture_non_power_of_two = true; // if (strstr(gl_extensions, "GL_SGIS_generate_mipmap")) //a suprising number of implementations have this broken. diff --git a/engine/gl/glquake.h b/engine/gl/glquake.h index e87d0854..ddc252d8 100644 --- a/engine/gl/glquake.h +++ b/engine/gl/glquake.h @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma warning(disable : 4136) // X86 #pragma warning(disable : 4051) // ALPHA #endif - + #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include @@ -97,6 +97,8 @@ typedef struct { qboolean arb_texture_env_dot3; qboolean arb_texture_cube_map; + qboolean ext_texture_filter_anisotropic; + qboolean arb_texture_compression; // qboolean arb_fragment_program; qboolean arb_shader_objects; @@ -806,7 +808,7 @@ extern qboolean r_recursiveaffinetriangles; // true if a driver wants to use // recursive triangular subdivison // and vertex drawing via // D_PolysetDrawFinalVerts() past - // a certain distance (normally + // a certain distance (normally // only used by the software // driver) extern float r_aliasuvscale; // scale-up factor for screen u and v