diff options
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--[-rwxr-xr-x] | indra/llrender/llglslshader.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 8790b1ed7d..2554ccdbe4 100755..100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -345,16 +345,12 @@ 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 - { + glDetachObjectARB(mProgramObject, obj[i]); glDeleteObjectARB(obj[i]); } - } glDeleteObjectARB(mProgramObject); |