diff options
author | Kitty Barnett <develop@catznip.com> | 2012-05-20 17:41:00 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2012-05-20 17:41:00 +0200 |
commit | 1300f77fdd48d90d09a05058ffdf10df93092391 (patch) | |
tree | 1cefd5cb64be5ae614b4930dcd0a55cf4fc06109 /indra/llrender/llglslshader.cpp | |
parent | 8199cc997aeaccc72b5bd5389ded8afc7b9c379c (diff) | |
parent | aa0a0542a10ba6faeca34afd6e323b505493d8dc (diff) |
Merged with viewer-beta
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); } |