diff --git a/binaries/data/config/default.cfg b/binaries/data/config/default.cfg index 78d24a8dfc..d7d3823afc 100644 --- a/binaries/data/config/default.cfg +++ b/binaries/data/config/default.cfg @@ -99,7 +99,6 @@ shadowscutoffdistance = 300.0 ; If true shadows cover the whole map instead of the camera frustum. shadowscovermap = false -texturequality = 5 ; Texture resolution and quality (0 - Lowest, 1 Very Low, 2 - Low, 3 - Medium, 4 - High, 5 - Very High, 6 - Ultra) vsync = false particles = true fog = true diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index ab5b92e788..d1bb942a8e 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -31,7 +31,6 @@ #include "lib/file/common/file_stats.h" #include "lib/input.h" #include "lib/ogl.h" -#include "lib/res/graphics/ogl_tex.h" #include "lib/res/h_mgr.h" #include "lib/timer.h" #include "lobby/IXmppClient.h" @@ -104,68 +103,9 @@ ERROR_TYPE(System, RequiredExtensionsMissing); thread_local std::shared_ptr g_ScriptContext; -static const int SANE_TEX_QUALITY_DEFAULT = 5; // keep in sync with code - bool g_InDevelopmentCopy; bool g_CheckedIfInDevelopmentCopy = false; -static void SetTextureQuality(int quality) -{ - int q_flags; - GLint filter; - -retry: - // keep this in sync with SANE_TEX_QUALITY_DEFAULT - switch(quality) - { - // worst quality - case 0: - q_flags = OGL_TEX_HALF_RES|OGL_TEX_HALF_BPP; - filter = GL_NEAREST; - break; - // [perf] add bilinear filtering - case 1: - q_flags = OGL_TEX_HALF_RES|OGL_TEX_HALF_BPP; - filter = GL_LINEAR; - break; - // [vmem] no longer reduce resolution - case 2: - q_flags = OGL_TEX_HALF_BPP; - filter = GL_LINEAR; - break; - // [vmem] add mipmaps - case 3: - q_flags = OGL_TEX_HALF_BPP; - filter = GL_NEAREST_MIPMAP_LINEAR; - break; - // [perf] better filtering - case 4: - q_flags = OGL_TEX_HALF_BPP; - filter = GL_LINEAR_MIPMAP_LINEAR; - break; - // [vmem] no longer reduce bpp - case SANE_TEX_QUALITY_DEFAULT: - q_flags = OGL_TEX_FULL_QUALITY; - filter = GL_LINEAR_MIPMAP_LINEAR; - break; - // [perf] add anisotropy - case 6: - // TODO: add anisotropic filtering - q_flags = OGL_TEX_FULL_QUALITY; - filter = GL_LINEAR_MIPMAP_LINEAR; - break; - // invalid - default: - debug_warn(L"SetTextureQuality: invalid quality"); - quality = SANE_TEX_QUALITY_DEFAULT; - // careful: recursion doesn't work and we don't want to duplicate - // the "sane" default values. - goto retry; - } - - ogl_tex_set_defaults(q_flags, filter); -} - ErrorReactionInternal psDisplayError(const wchar_t* UNUSED(text), size_t UNUSED(flags)) { // If we're fullscreen, then sometimes (at least on some particular drivers on Linux) @@ -730,15 +670,6 @@ void InitGraphics(const CmdLineArgs& args, int flags, const std::vector& i RunHardwareDetection(); - 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(); // Optionally start profiler GPU timings automatically