summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp10
1 files changed, 3 insertions, 7 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);