Anisotropic Filtering

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1654 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2005-12-01 11:22:20 +00:00
parent eae50d7bf6
commit 96c5dd71ec
2 changed files with 17 additions and 3 deletions

View file

@ -128,6 +128,7 @@ lpMTexFUNC qglMTexCoord2fSGIS;
lpSelTexFUNC qglSelectTextureSGIS; lpSelTexFUNC qglSelectTextureSGIS;
int mtexid0; int mtexid0;
int mtexid1; int mtexid1;
int gl_anisotropy_factor_max;
//ati_truform //ati_truform
PFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI; PFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI;
@ -225,6 +226,17 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name))
gl_config.arb_shader_objects = false; 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")) if (strstr(gl_extensions, "GL_ARB_texture_non_power_of_two"))
gl_config.arb_texture_non_power_of_two = true; 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. // if (strstr(gl_extensions, "GL_SGIS_generate_mipmap")) //a suprising number of implementations have this broken.

View file

@ -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, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of 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. 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 : 4136) // X86
#pragma warning(disable : 4051) // ALPHA #pragma warning(disable : 4051) // ALPHA
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -97,6 +97,8 @@ typedef struct {
qboolean arb_texture_env_dot3; qboolean arb_texture_env_dot3;
qboolean arb_texture_cube_map; qboolean arb_texture_cube_map;
qboolean ext_texture_filter_anisotropic;
qboolean arb_texture_compression; qboolean arb_texture_compression;
// qboolean arb_fragment_program; // qboolean arb_fragment_program;
qboolean arb_shader_objects; qboolean arb_shader_objects;
@ -806,7 +808,7 @@ extern qboolean r_recursiveaffinetriangles; // true if a driver wants to use
// recursive triangular subdivison // recursive triangular subdivison
// and vertex drawing via // and vertex drawing via
// D_PolysetDrawFinalVerts() past // D_PolysetDrawFinalVerts() past
// a certain distance (normally // a certain distance (normally
// only used by the software // only used by the software
// driver) // driver)
extern float r_aliasuvscale; // scale-up factor for screen u and v extern float r_aliasuvscale; // scale-up factor for screen u and v