summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-05-11 21:21:01 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-05-11 21:21:01 -0700
commitad4118f6ceaf1c22b22d58825924aad5575319f9 (patch)
treea1227572853491f2e89fb0db128230c40248b47d /indra/newview/lldrawpoolbump.cpp
parent339e02ef3311ad5c1197dfca2955a0c202b7c408 (diff)
parent06bdee663433bf5b12eddcbcfcb8785546354c28 (diff)
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 35265b6df0..38768a19c8 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -77,6 +77,7 @@ static LLGLSLShader* shader = NULL;
static S32 cube_channel = -1;
static S32 diffuse_channel = -1;
static S32 bump_channel = -1;
+static BOOL shiny = FALSE;
// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an
// LLAtomicBool; this should work just fine, now. HB
@@ -197,7 +198,7 @@ void LLStandardBumpmap::destroyGL()
LLDrawPoolBump::LLDrawPoolBump()
: LLRenderPass(LLDrawPool::POOL_BUMP)
{
- mShiny = FALSE;
+ shiny = FALSE;
}
@@ -346,7 +347,7 @@ void LLDrawPoolBump::beginFullbrightShiny()
diffuse_channel = 0;
}
- mShiny = TRUE;
+ shiny = TRUE;
}
void LLDrawPoolBump::renderFullbrightShiny()
@@ -398,14 +399,14 @@ void LLDrawPoolBump::endFullbrightShiny()
diffuse_channel = -1;
cube_channel = 0;
- mShiny = FALSE;
+ shiny = FALSE;
}
void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, bool texture = true)
{
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
@@ -541,7 +542,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
- mShiny = TRUE;
+ shiny = TRUE;
for (int i = 0; i < 2; ++i)
{
bool rigged = i == 1;
@@ -575,11 +576,11 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
avatar = params.mAvatar;
skin = params.mSkinInfo->mHash;
}
- pushBatch(params, true, false);
+ pushBumpBatch(params, true, false);
}
else
{
- pushBatch(params, true, false);
+ pushBumpBatch(params, true, false);
}
}
@@ -589,7 +590,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
gGL.getTexUnit(0)->activate();
}
- mShiny = FALSE;
+ shiny = FALSE;
}
@@ -1213,20 +1214,18 @@ void LLDrawPoolBump::pushBumpBatches(U32 type)
}
}
}
- pushBatch(params, false);
+ pushBumpBatch(params, false);
}
}
}
-void LLDrawPoolBump::pushBatch(LLDrawInfo& params, bool texture, bool batch_textures, bool reset_gltf)
+void LLRenderPass::pushBumpBatch(LLDrawInfo& params, bool texture, bool batch_textures)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
applyModelMatrix(params);
bool tex_setup = false;
- if (reset_gltf) { LLRenderPass::resetGLTFTextureTransform(); }
-
if (batch_textures && params.mTextureList.size() > 1)
{
for (U32 i = 0; i < params.mTextureList.size(); ++i)
@@ -1241,7 +1240,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, bool texture, bool batch_text
{ //not batching textures or batch has only 1 texture -- might need a texture matrix
if (params.mTextureMatrix)
{
- if (mShiny)
+ if (shiny)
{
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
@@ -1260,7 +1259,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, bool texture, bool batch_text
tex_setup = true;
}
- if (mShiny && mShaderLevel > 1 && texture)
+ if (shiny && mShaderLevel > 1 && texture)
{
if (params.mTexture.notNull())
{
@@ -1278,7 +1277,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, bool texture, bool batch_text
if (tex_setup)
{
- if (mShiny)
+ if (shiny)
{
gGL.getTexUnit(0)->activate();
}