summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-04-11 17:54:18 +0000
committerJosh Bell <josh@lindenlab.com>2007-04-11 17:54:18 +0000
commit0277259455c4354f81ea8a24c8ab93f27567bc6f (patch)
treef1411dab563dcf697f794e9e8a592a6d3e5c4d2d /indra/llrender/llimagegl.cpp
parent568397bbcc4fca307ebc010ec7f815422b9ba80a (diff)
svn merge -r 59968:60342 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 1196db18fa..a36dfd2269 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -157,7 +157,7 @@ void LLImageGL::destroyGL(BOOL save_state)
if (save_state)
{
glimage->mSaveData = new LLImageRaw;
- glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData);
+ glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData, false);
}
glimage->destroyGLTexture();
stop_glerror();
@@ -920,7 +920,7 @@ BOOL LLImageGL::setDiscardLevel(S32 discard_level)
LLPointer<LLImageRaw> imageraw = new LLImageRaw;
while(discard_level > mCurrentDiscardLevel)
{
- if (readBackRaw(discard_level, imageraw))
+ if (readBackRaw(discard_level, imageraw, false))
{
break;
}
@@ -942,7 +942,7 @@ BOOL LLImageGL::setDiscardLevel(S32 discard_level)
}
}
-BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw)
+BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok)
{
if (discard_level < 0)
{
@@ -980,7 +980,10 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw)
}
LLGLint is_compressed = 0;
- glGetTexLevelParameteriv(mTarget, is_compressed, GL_TEXTURE_COMPRESSED, (GLint*)&is_compressed);
+ if (compressed_ok)
+ {
+ glGetTexLevelParameteriv(mTarget, is_compressed, GL_TEXTURE_COMPRESSED, (GLint*)&is_compressed);
+ }
if (is_compressed)
{
LLGLint glbytes;