Skip to content

Commit 197475b

Browse files
author
Rye
committed
Restore support for anistropic filtering on macos
1 parent 041224e commit 197475b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

indra/llrender/llgl.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ bool LLGLManager::initGL()
12541254
// there's some implementation that reports a crazy value
12551255
mMaxUniformBlockSize = llmin(mMaxUniformBlockSize, 65536);
12561256

1257-
if (mGLVersion >= 4.59f)
1257+
if (mHasAnisotropic)
12581258
{
12591259
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &mMaxAnisotropy);
12601260
}
@@ -1421,6 +1421,11 @@ void LLGLManager::initExtensions()
14211421
mHasCubeMapArray = mGLVersion >= 3.99f;
14221422
mHasTransformFeedback = mGLVersion >= 3.99f;
14231423
mHasDebugOutput = mGLVersion >= 4.29f;
1424+
mHasAnisotropic = mGLVersion >= 4.59f;
1425+
if(!mHasAnisotropic && gGLHExts.mSysExts)
1426+
{
1427+
mHasAnisotropic = ExtensionExists("GL_EXT_texture_filter_anisotropic", gGLHExts.mSysExts);
1428+
}
14241429

14251430
#if LL_WINDOWS || LL_LINUX
14261431
if( gGLHExts.mSysExts )

indra/llrender/llrender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio
517517
}
518518
}
519519

520-
if (gGLManager.mGLVersion >= 4.59f)
520+
if (gGLManager.mHasAnisotropic)
521521
{
522522
if (LLImageGL::sGlobalUseAnisotropic && option == TFO_ANISOTROPIC)
523523
{

0 commit comments

Comments
 (0)