diff options
author | Oz Linden <oz@lindenlab.com> | 2016-05-06 10:28:42 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2016-05-06 10:28:42 -0400 |
commit | 950c41d184b340a7a3370c2cbda5d1eed9a17b0b (patch) | |
tree | 373912394af6834d7d56258becf46954244b8423 /indra/llrender | |
parent | 20198b750d02c769ab6845226f98ce6e5dd1f20b (diff) | |
parent | 7f5e6cea124e1193b199a3eabd50bdab96340c13 (diff) |
merge 4.0.4-release and MAINT-5974
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 10 | ||||
-rw-r--r-- | indra/llrender/llgltexture.cpp | 3 |
2 files changed, 5 insertions, 8 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 52b8de8365..b30bc1aed6 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -345,15 +345,11 @@ void LLGLSLShader::unloadInternal() GLhandleARB obj[1024]; GLsizei count; - glGetAttachedObjectsARB(mProgramObject, 1024, &count, obj); + glGetAttachedObjectsARB(mProgramObject, sizeof(obj)/sizeof(obj[0]), &count, obj); for (GLsizei i = 0; i < count; i++) { -#if !LL_DARWIN - if (glIsProgramARB(obj[i])) -#endif - { - glDeleteObjectARB(obj[i]); - } + glDetachObjectARB(mProgramObject, obj[i]); + glDeleteObjectARB(obj[i]); } glDeleteObjectARB(mProgramObject); diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp index 56e263c5f1..3a6eebebba 100644 --- a/indra/llrender/llgltexture.cpp +++ b/indra/llrender/llgltexture.cpp @@ -112,7 +112,8 @@ void LLGLTexture::setBoostLevel(S32 level) if(mBoostLevel != level) { mBoostLevel = level ; - if(mBoostLevel != LLGLTexture::BOOST_NONE) + if(mBoostLevel != LLGLTexture::BOOST_NONE + && mBoostLevel != LLGLTexture::BOOST_ICON) { setNoDelete() ; } |