diff options
author | Josh Bell <josh@lindenlab.com> | 2007-04-11 17:54:18 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-04-11 17:54:18 +0000 |
commit | 0277259455c4354f81ea8a24c8ab93f27567bc6f (patch) | |
tree | f1411dab563dcf697f794e9e8a592a6d3e5c4d2d /indra/llrender | |
parent | 568397bbcc4fca307ebc010ec7f815422b9ba80a (diff) |
svn merge -r 59968:60342 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 11 | ||||
-rw-r--r-- | indra/llrender/llimagegl.h | 3 |
2 files changed, 9 insertions, 5 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; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 1586a837b4..d66c286184 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -72,7 +72,8 @@ public: BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height); BOOL setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height); BOOL setDiscardLevel(S32 discard_level); - BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw); // Read back a raw image for this discard level, if it exists + // Read back a raw image for this discard level, if it exists + BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok); void destroyGLTexture(); void setClamp(BOOL clamps, BOOL clampt); |