diff options
| author | Dave Parks <davep@lindenlab.com> | 2013-06-21 12:51:29 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2013-06-21 12:51:29 -0500 |
| commit | 79029149a415a9f32e08d378653199a880d21e65 (patch) | |
| tree | 14b6f7d59c66602affd77b6e21f1981b28995fa8 /indra/llrender/llimagegl.cpp | |
| parent | 80552a465e9169b7326c346f4685790ea459823a (diff) | |
| parent | 8511385a5407181ced7bb226d4054185c597d05e (diff) | |
Automated merge with file:///F:%5Cviewer-bear
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
| -rwxr-xr-x | indra/llrender/llimagegl.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 38764eba23..6a37d31415 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -715,9 +715,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) mMipLevels = wpo2(llmax(w, h)); - //use legacy mipmap generation mode + //use legacy mipmap generation mode (note: making this condional can cause rendering issues) glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); - + LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, mFormatPrimary, mFormatType, @@ -1089,6 +1089,16 @@ void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 n LLFastTimer t(FTM_GENERATE_TEXTURES); bool empty = true; + if (LLRender::sGLCoreProfile) + { + switch (format) + { + case GL_LUMINANCE8: format = GL_RGB8; break; + case GL_LUMINANCE8_ALPHA8: + case GL_ALPHA8: format = GL_RGBA8; break; + } + } + dead_texturelist_t::iterator iter = sDeadTextureList[type].find(format); if (iter != sDeadTextureList[type].end()) |
