diff options
author | Rye <rye@lindenlab.com> | 2024-11-16 03:51:33 -0500 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-03-16 06:11:50 +0800 |
commit | e047700957d27d1737149e4156e80660377eb393 (patch) | |
tree | e191e90c92887fb1194e19c560d1ccc32a05a09c | |
parent | 95eb16bdaa80b1416ee60f7fae74c204b0eccfa2 (diff) |
Restore support for anistropic filtering on macos
-rw-r--r-- | indra/llrender/llgl.cpp | 7 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 17fa8f14a9..2799743e36 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1273,7 +1273,7 @@ bool LLGLManager::initGL() // there's some implementation that reports a crazy value mMaxUniformBlockSize = llmin(mMaxUniformBlockSize, 65536); - if (mGLVersion >= 4.59f) + if (mHasAnisotropic) { glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &mMaxAnisotropy); } @@ -1440,6 +1440,11 @@ void LLGLManager::initExtensions() mHasCubeMapArray = mGLVersion >= 3.99f; mHasTransformFeedback = mGLVersion >= 3.99f; mHasDebugOutput = mGLVersion >= 4.29f; + mHasAnisotropic = mGLVersion >= 4.59f; + if(!mHasAnisotropic && gGLHExts.mSysExts) + { + mHasAnisotropic = ExtensionExists("GL_EXT_texture_filter_anisotropic", gGLHExts.mSysExts); + } // Misc glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 9f3f42d6d5..cbb178b6f8 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -517,7 +517,7 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio } } - if (gGLManager.mGLVersion >= 4.59f) + if (gGLManager.mHasAnisotropic) { if (LLImageGL::sGlobalUseAnisotropic && option == TFO_ANISOTROPIC) { |