summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-10 11:48:38 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-10 11:48:38 +0800
commit929c658fcaf5f8d9ffce1cafc9e52d62788841e4 (patch)
treec61dd209eecd473916236ad96330ae6f4e5a91ec /indra/newview
parent6e365caf80d38b792fd74f8c9b54253268d6b24c (diff)
GL_ALPHA8_EXT as an alternative to GL_ALPHA8
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/llviewertexturelist.cpp10
-rw-r--r--indra/newview/llvoavatar.cpp4
3 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index dafc4a0a0a..58a78f508c 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1207,7 +1207,11 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
if (!LLPipeline::sRenderDeferred)
{
+#if GL_VERSION_1_1
bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
+#else
+ bump->setExplicitFormat(GL_ALPHA8_EXT, GL_ALPHA);
+#endif
#if LL_BUMPLIST_MULTITHREADED
auto tex_queue = LLImageGLThread::sEnabled ? sTexUpdateQueue.lock() : nullptr;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index e6d4b0d026..b48290776a 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -166,15 +166,25 @@ void LLViewerTextureList::doPreloadImages()
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
+#if GL_VERSION_1_1
image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD);
+#else
+ image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
+ GL_ALPHA8_EXT, GL_ALPHA, IMG_ALPHA_GRAD);
+#endif
if (image)
{
image->setAddressMode(LLTexUnit::TAM_CLAMP);
mImagePreloads.insert(image);
}
+#if GL_VERSION_1_1
image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD_2D);
+#else
+ image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
+ GL_ALPHA8_EXT, GL_ALPHA, IMG_ALPHA_GRAD_2D);
+#endif
if (image)
{
image->setAddressMode(LLTexUnit::TAM_CLAMP);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4a53f2b2cd..348442cf18 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -9765,7 +9765,11 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
stop_glerror();
LLImageGL::setManualImage(
+#if GL_VERSION_1_1
GL_TEXTURE_2D, 0, GL_ALPHA8,
+#else
+ GL_TEXTURE_2D, 0, GL_ALPHA8_EXT,
+#endif
aux_src->getWidth(), aux_src->getHeight(),
GL_ALPHA, GL_UNSIGNED_BYTE, aux_src->getData());
stop_glerror();