Probe GL_EXT_texture_filter_anisotropic with our new logic

This commit is contained in:
Yamagi Burmeister 2016-08-06 10:18:58 +02:00
parent 43c9970772
commit 2e7166b157
2 changed files with 19 additions and 6 deletions

View file

@ -381,12 +381,15 @@ typedef struct
// ----
qboolean anisotropic;
qboolean palettedtexture;
qboolean pointparameters;
qboolean mtexcombine;
qboolean anisotropic;
// ----
float max_anisotropy;
qboolean tex_npot;

View file

@ -1437,7 +1437,7 @@ R_Init(void *hinstance, void *hWnd)
// ----
/* Point parameters */
VID_Printf(PRINT_ALL, "- Point parameters: ");
VID_Printf(PRINT_ALL, " - Point parameters: ");
if (strstr(gl_config.extensions_string, "GL_ARB_point_parameters"))
{
@ -1467,7 +1467,7 @@ R_Init(void *hinstance, void *hWnd)
// ----
/* Paletted texture */
VID_Printf(PRINT_ALL, "- Paletted texture: ");
VID_Printf(PRINT_ALL, " - Paletted texture: ");
if (strstr(gl_config.extensions_string, "GL_EXT_paletted_texture") &&
strstr(gl_config.extensions_string, "GL_EXT_shared_texture_palette"))
@ -1497,6 +1497,7 @@ R_Init(void *hinstance, void *hWnd)
// ----
/* TODO */
if (strstr(gl_config.extensions_string, "GL_ARB_multitexture"))
{
if (gl_ext_multitexture->value)
@ -1517,23 +1518,30 @@ R_Init(void *hinstance, void *hWnd)
VID_Printf(PRINT_ALL, "...GL_ARB_multitexture not found\n");
}
gl_config.anisotropic = false;
// ----
/* Anisotropic */
VID_Printf(PRINT_ALL, " - Anisotropic: ");
if (strstr(gl_config.extensions_string, "GL_EXT_texture_filter_anisotropic"))
{
VID_Printf(PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic\n");
gl_config.anisotropic = true;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_config.max_anisotropy);
Cvar_SetValue("gl_anisotropic_avail", gl_config.max_anisotropy);
VID_Printf(PRINT_ALL, "%ux\n", (int)gl_config.max_anisotropy);
}
else
{
VID_Printf(PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n");
gl_config.anisotropic = false;
gl_config.max_anisotropy = 0.0;
Cvar_SetValue("gl_anisotropic_avail", 0.0);
VID_Printf(PRINT_ALL, "failed\n");
}
// ----
if (strstr(gl_config.extensions_string, "GL_ARB_texture_non_power_of_two"))
{
VID_Printf(PRINT_ALL, "...using GL_ARB_texture_non_power_of_two\n");
@ -1559,6 +1567,8 @@ R_Init(void *hinstance, void *hWnd)
VID_Printf(PRINT_ALL, "...GL_ARB_texture_env_combine not found\n");
}
// ----
if (!gl_config.mtexcombine)
{
if (strstr(gl_config.extensions_string, "GL_EXT_texture_env_combine"))