summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorCallum Linden <113564339+callumlinden@users.noreply.github.com>2025-09-04 14:51:34 -0700
committerGitHub <noreply@github.com>2025-09-04 14:51:34 -0700
commit66ccfabdd39a8a54a94d5dbf15364ff7f94a13c2 (patch)
treefae8bca7bb3f3ac05972803e2fefc05de8542408 /indra/llrender/llgl.cpp
parent0ae3de8f1e78dc74914ea70e725c8324390f3e97 (diff)
parent90aa693f2a9ece9f1c624dba245f202e126bca5b (diff)
Merge branch 'project/mac_universal' into callum/viewer-cef-2025-08
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 0be27b8975..d13b98e274 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1123,17 +1123,6 @@ bool LLGLManager::initGL()
if (mGLVersion >= 2.f)
{
parse_glsl_version(mGLSLVersionMajor, mGLSLVersionMinor);
-
-#if 0 && LL_DARWIN
- // TODO maybe switch to using a core profile for GL 3.2?
- // https://stackoverflow.com/a/19868861
- //never use GLSL greater than 1.20 on OSX
- if (mGLSLVersionMajor > 1 || mGLSLVersionMinor > 30)
- {
- mGLSLVersionMajor = 1;
- mGLSLVersionMinor = 30;
- }
-#endif
}
if (mGLVersion >= 2.1f && LLImageGL::sCompressTextures)
@@ -1247,7 +1236,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, &mMaxAnisotropy);
}
@@ -1411,6 +1400,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);
@@ -2728,7 +2722,7 @@ void LLGLUserClipPlane::setPlane(F32 a, F32 b, F32 c, F32 d)
if(cplane[2] < 0)
cplane *= -1;
- glm::mat4 suffix;
+ glm::mat4 suffix = glm::identity<glm::mat4>();
suffix = glm::row(suffix, 2, cplane);
glm::mat4 newP = suffix * P;
gGL.matrixMode(LLRender::MM_PROJECTION);