diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-04-26 14:07:09 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-04-26 14:07:09 -0400 |
commit | 0249a0d1e7564d06eadb8a23b0f058008dfd6068 (patch) | |
tree | 3553c0ca29f860279fb363e1a62c00158a35dca3 /indra/llrender/llglslshader.cpp | |
parent | d6569db3520f7e0ce2d93febb6f4e26b48c08a3d (diff) | |
parent | 6d3be57d334f02f4781dcaede9746976bd3643a4 (diff) |
Automated merge with http://hg.secondlife.com/viewer-release
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 3773568ad8..4b7e639aed 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -109,7 +109,12 @@ void LLGLSLShader::unload() glGetAttachedObjectsARB(mProgramObject, 1024, &count, obj); for (GLsizei i = 0; i < count; i++) { - glDeleteObjectARB(obj[i]); +#if !LL_DARWIN + if (glIsProgramARB(obj[i])) +#endif + { + glDeleteObjectARB(obj[i]); + } } glDeleteObjectARB(mProgramObject); @@ -161,8 +166,9 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes, return FALSE; } - if (gGLManager.mGLVersion < 3.1f) - { //attachShaderFeatures may have set the number of indexed texture channels, so set to 1 again + if (gGLManager.mGLSLVersionMajor < 2 && gGLManager.mGLSLVersionMinor < 3) + { //indexed texture rendering requires GLSL 1.3 or later + //attachShaderFeatures may have set the number of indexed texture channels, so set to 1 again mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1); } |