summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-06 12:13:18 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-06 12:13:18 +0800
commit907b4f5925265a5ce7da49aa58e9df3d30c97168 (patch)
tree0f76380d5863945d8055bc61dca022b7ed9e45ad /indra
parent99eb1b6ca476a52214cf3c214dcf89785bdfa68e (diff)
Check for GL_BGRA_EXT before compiling its code
Diffstat (limited to 'indra')
-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 06312e778c..dbb206839a 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -2162,9 +2162,11 @@ void LLImageGL::calcAlphaChannelOffsetAndStride()
#endif
mAlphaStride = 4;
break;
+#if GL_EXT_bgra
case GL_BGRA_EXT:
mAlphaStride = 4;
break;
+#endif
default:
break;
}
@@ -2200,8 +2202,12 @@ void LLImageGL::calcAlphaChannelOffsetAndStride()
#endif // GL_VERSION_1_2
if( mAlphaStride < 1 || //unsupported format
- mAlphaOffset < 0 || //unsupported type
- (mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE)) //unknown situation
+ mAlphaOffset < 0 //unsupported type
+#if GL_EXT_bgra
+ ||
+ (mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE) //unknown situation
+#endif
+ )
{
LL_WARNS() << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << LL_ENDL;