diff options
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() ; } |