summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-06 10:51:41 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-06 10:51:41 +0800
commit6b3198347f0b48738d3ebaab2c415f1d12cd525f (patch)
treefc39e65ec7a88c4eea25259431b6ac2e6cf29550 /indra/llrender/llrender.cpp
parent93a309edb2e824514b832f0970ca1927522afc63 (diff)
Lose the _ARB suffix from many macros
so the macros can be used on platforms that don't have ARB specs.
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 84ef895ee4..7c6b091ac5 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -72,7 +72,7 @@ static const GLenum sGLTextureType[] =
#if GL_VERSION_3_1
GL_TEXTURE_RECTANGLE_ARB,
#endif
- GL_TEXTURE_CUBE_MAP_ARB,
+ GL_TEXTURE_CUBE_MAP,
#if GL_VERSION_3_2
GL_TEXTURE_2D_MULTISAMPLE,
#endif
@@ -126,7 +126,7 @@ void LLTexUnit::refreshState(void)
gGL.flush();
- glActiveTexture(GL_TEXTURE0_ARB + mIndex);
+ glActiveTexture(GL_TEXTURE0 + mIndex);
if (mCurrTexType != TT_NONE)
{
@@ -147,7 +147,7 @@ void LLTexUnit::activate(void)
if ((S32)gGL.mCurrTextureUnitIndex != mIndex || gGL.mDirty)
{
gGL.flush();
- glActiveTexture(GL_TEXTURE0_ARB + mIndex);
+ glActiveTexture(GL_TEXTURE0 + mIndex);
gGL.mCurrTextureUnitIndex = mIndex;
}
}
@@ -191,7 +191,7 @@ void LLTexUnit::bindFast(LLTexture* texture)
{
LLImageGL* gl_tex = texture->getGLTexture();
- glActiveTexture(GL_TEXTURE0_ARB + mIndex);
+ glActiveTexture(GL_TEXTURE0 + mIndex);
gGL.mCurrTextureUnitIndex = mIndex;
mCurrTexture = gl_tex->getTexName();
if (!mCurrTexture)
@@ -343,7 +343,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
activate();
enable(LLTexUnit::TT_CUBE_MAP);
mCurrTexture = cubeMap->mImages[0]->getTexName();
- glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, mCurrTexture);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, mCurrTexture);
mHasMipMaps = cubeMap->mImages[0]->mHasMipMaps;
cubeMap->mImages[0]->updateBindStats(cubeMap->mImages[0]->mTextureMemory);
if (cubeMap->mImages[0]->mTexOptionsDirty)
@@ -473,7 +473,7 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode)
glTexParameteri (sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_T, sGLAddressMode[mode]);
if (mCurrTexType == TT_CUBE_MAP)
{
- glTexParameteri (GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]);
+ glTexParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]);
}
}
@@ -650,10 +650,10 @@ void LLTexUnit::debugTextureUnit(void)
if (mIndex < 0) return;
GLint activeTexture;
- glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &activeTexture);
- if ((GL_TEXTURE0_ARB + mIndex) != activeTexture)
+ glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture);
+ if ((GL_TEXTURE0 + mIndex) != activeTexture)
{
- U32 set_unit = (activeTexture - GL_TEXTURE0_ARB);
+ U32 set_unit = (activeTexture - GL_TEXTURE0);
LL_WARNS() << "Incorrect Texture Unit! Expected: " << set_unit << " Actual: " << mIndex << LL_ENDL;
}
}