summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 2f1f702d2c..790ba25112 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1385,22 +1385,28 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
mFormatType = GL_UNSIGNED_BYTE;
break;
case 3:
+ #if USE_SRGB_DECODE
if (gGLManager.mHasTexturesRGBDecode)
{
mFormatInternal = GL_SRGB8;
}
- else {
+ else
+ #endif
+ {
mFormatInternal = GL_RGB8;
}
mFormatPrimary = GL_RGB;
mFormatType = GL_UNSIGNED_BYTE;
break;
case 4:
+ #if USE_SRGB_DECODE
if (gGLManager.mHasTexturesRGBDecode)
{
mFormatInternal = GL_SRGB8_ALPHA8;
}
- else {
+ else
+ #endif
+ {
mFormatInternal = GL_RGBA8;
}
mFormatPrimary = GL_RGBA;