diff options
| author | JJ Linden <jj@lindenlab.com> | 2013-10-10 16:44:22 -0700 |
|---|---|---|
| committer | JJ Linden <jj@lindenlab.com> | 2013-10-10 16:44:22 -0700 |
| commit | dc431ea6d2e4e13ab505b8118d6f9220630efe96 (patch) | |
| tree | 8c37de1ca61cf29e3d1863ce08d34acff666e9ab /indra/llrender/llimagegl.cpp | |
| parent | 3aea5a5a6ab0e6d96fe581a9bab9896956129ba3 (diff) | |
| parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
merged in recent changes
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()) |
