summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-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 "";
}