Index: binaries/data/config/default.cfg =================================================================== --- binaries/data/config/default.cfg +++ binaries/data/config/default.cfg @@ -84,6 +84,7 @@ shadowpcf = true shadowsfixed = false ; When enabled shadows are rendered only on the shadowsfixeddistance = 300.0 ; fixed distance and without swimming effect. +texturequality = 6 ; Texture resolution and quality (0 - Lowest, 1 Very Low, 2 - Low, 3 - Medium, 4 - High, 5 - Very High, 6 - Ultra) vsync = false particles = true Index: source/lib/res/graphics/ogl_tex.cpp =================================================================== --- source/lib/res/graphics/ogl_tex.cpp +++ source/lib/res/graphics/ogl_tex.cpp @@ -55,6 +55,8 @@ case GL_NEAREST_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR: return true; + case GL_EXT_texture_filter_anisotropic: + return ogl_tex_has_anisotropy(); default: return false; } @@ -428,6 +430,7 @@ static void OglTex_init(OglTex* ot, va_list args) { + ONCE(detect_gl_upload_caps()); Tex* wrapped_tex = va_arg(args, Tex*); if(wrapped_tex) { Index: source/ps/GameSetup/GameSetup.cpp =================================================================== --- source/ps/GameSetup/GameSetup.cpp +++ source/ps/GameSetup/GameSetup.cpp @@ -165,7 +165,7 @@ case 6: // TODO: add anisotropic filtering q_flags = OGL_TEX_FULL_QUALITY; - filter = GL_LINEAR_MIPMAP_LINEAR; + filter = ogl_tex_has_anisotropy() ? GL_EXT_texture_filter_anisotropic : GL_LINEAR_MIPMAP_LINEAR; break; // invalid default: @@ -981,8 +981,14 @@ RunHardwareDetection(); - const int quality = SANE_TEX_QUALITY_DEFAULT; // TODO: set value from config file - SetTextureQuality(quality); + if (g_AtlasGameLoop && g_AtlasGameLoop->view) + SetTextureQuality(SANE_TEX_QUALITY_DEFAULT); + else + { + int textureQuality = SANE_TEX_QUALITY_DEFAULT; + CFG_GET_VAL("texturequality", textureQuality); + SetTextureQuality(textureQuality); + } ogl_WarnIfError();