From 6c51a262d8b576355622eadeef156ef4e6135266 Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:39:04 -0700 Subject: Fix mac link error using GL 4.3 functions (#2813) --- indra/llrender/llgltexture.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra') 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 ""; } -- cgit v1.2.3