summaryrefslogtreecommitdiff
path: root/indra/llrender/llgltexture.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-10-04 17:39:04 -0700
committerGitHub <noreply@github.com>2024-10-04 17:39:04 -0700
commit6c51a262d8b576355622eadeef156ef4e6135266 (patch)
tree56907b378df7d86cc547585e453e11462c2acd89 /indra/llrender/llgltexture.cpp
parentea71037ccc0bd4b9e86f3f132109859258c54619 (diff)
Fix mac link error using GL 4.3 functions (#2813)
Diffstat (limited to 'indra/llrender/llgltexture.cpp')
-rw-r--r--indra/llrender/llgltexture.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp
index bb4205b319..c2298d5377 100644
--- a/indra/llrender/llgltexture.cpp
+++ b/indra/llrender/llgltexture.cpp
@@ -190,6 +190,13 @@ void LLGLTexture::getGLObjectLabel(std::string& label, bool& error) const
label.clear();
return;
}
+
+#if LL_DARWIN
+ // apple doesn't support GL after 4.1 so should have hit the above early out, but make the compiler happy here
+ error = true;
+ label.clear();
+ return;
+#else
static GLsizei max_length = 0;
if (max_length == 0) { glGetIntegerv(GL_MAX_LABEL_LENGTH, &max_length); }
static char * clabel = new char[max_length+1];
@@ -197,12 +204,13 @@ void LLGLTexture::getGLObjectLabel(std::string& label, bool& error) const
glGetObjectLabel(GL_TEXTURE, texname, max_length+1, &length, clabel);
error = false;
label.assign(clabel, length);
+#endif
}
std::string LLGLTexture::setGLObjectLabel(const std::string& prefix, bool append_texname) const
{
+#ifndef LL_DARWIN // apple doesn't support GL > 4.1
if (gGLManager.mGLVersion < 4.29f) { return ""; } // GL_VERSION_4_3
-
llassert(mGLTexturep);
if (mGLTexturep)
{
@@ -236,6 +244,7 @@ std::string LLGLTexture::setGLObjectLabel(const std::string& prefix, bool append
}
}
}
+#endif
return "";
}