diff options
author | dolphin <dolphin@lindenlab.com> | 2013-10-04 09:19:25 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2013-10-04 09:19:25 -0700 |
commit | c2c060d4401d3a79a9ae0076af0c9b86d14f7f37 (patch) | |
tree | b7efcf3c2e38aa9de488342b3379b4bde0a6bc47 /indra/llrender/llimagegl.cpp | |
parent | d44c85c6dc575c0c67019ce1bffecfaa5bc275d1 (diff) | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) |
Merge with 3.6.7
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()) |