summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorIma Mechanique <ima.mechanique@secondlife.com>2013-10-04 20:47:54 +0100
committerIma Mechanique <ima.mechanique@secondlife.com>2013-10-04 20:47:54 +0100
commit0c1d6d7d9e89a6d3169621157bcba335ead477a9 (patch)
treec5523eeb99bcd8ee77cf28a1d6f5e5cef8b52f2c /indra/llrender/llimagegl.cpp
parent02097397e06a6cf45c639823c7f633dffe3684e8 (diff)
parentf7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff)
Merge v3.6.7 in
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rwxr-xr-x[-rw-r--r--]indra/llrender/llimagegl.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 38764eba23..6a37d31415 100644..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())