summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2021-12-01 15:59:02 +0000
committerEuclid Linden <euclid@lindenlab.com>2021-12-01 15:59:02 +0000
commit3f82f7ce3d4fb51407f366b2ad2f15d990de40b2 (patch)
tree45be0f3213f0e095d9a7929c693f4671c8b58e08 /indra/newview/lldrawpoolbump.cpp
parent01317a2faded53c79db7e0814426f1d8b2fd12fc (diff)
parentabd7d80048529fd971e1b65ea3afe0f7e78bd356 (diff)
Merged in euclid-pre-16386 (pull request #793)
Purge LLGLSLShader::sNoFixedFunction, and all that flows from it. No functional changes. Approved-by: Michael Pohoreski Approved-by: Dave Parks
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp39
1 files changed, 4 insertions, 35 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index af8b194f38..dc52fc7680 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -383,7 +383,6 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
// the cube map in the one pass shiny shaders
cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
cube_map->enableTexture(cube_channel);
- cube_map->enableTextureCoords(1);
diffuse_channel = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
}
else
@@ -402,9 +401,6 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
gGL.getTexUnit(0)->disable();
cube_map->enable(0);
gGL.getTexUnit(0)->bind(cube_map);
-
- gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR);
- gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_ALPHA);
}
}
}
@@ -537,7 +533,6 @@ void LLDrawPoolBump::beginFullbrightShiny()
gGL.getTexUnit(1)->disable();
cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
cube_map->enableTexture(cube_channel);
- cube_map->enableTextureCoords(1);
diffuse_channel = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
gGL.getTexUnit(cube_channel)->bind(cube_map);
@@ -593,21 +588,9 @@ void LLDrawPoolBump::endFullbrightShiny()
if( cube_map )
{
cube_map->disable();
-
- /*if (diffuse_channel != 0)
- {
- shader->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- }
- gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);*/
-
shader->unbind();
- //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
- //gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
-
diffuse_channel = -1;
cube_channel = 0;
mShiny = FALSE;
@@ -745,23 +728,9 @@ void LLDrawPoolBump::renderBump(U32 pass)
//static
void LLDrawPoolBump::endBump(U32 pass)
{
- if (LLGLSLShader::sNoFixedFunction)
- {
- gObjectBumpProgram.unbind();
- }
- else
- {
- // Disable texture blending on unit 1
- gGL.getTexUnit(1)->activate();
- gGL.getTexUnit(1)->disable();
- gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
+ gObjectBumpProgram.unbind();
- // Disable texture blending on unit 0
- gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
- }
-
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
S32 LLDrawPoolBump::getNumDeferredPasses()
@@ -1541,7 +1510,7 @@ void LLDrawPoolInvisible::render(S32 pass)
{ //render invisiprims
LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE);
- if (gPipeline.canUseVertexShaders())
+ if (gPipeline.shadersLoaded())
{
gOcclusionProgram.bind();
}
@@ -1553,7 +1522,7 @@ void LLDrawPoolInvisible::render(S32 pass)
gGL.setColorMask(true, false);
glStencilMask(0xFFFFFFFF);
- if (gPipeline.canUseVertexShaders())
+ if (gPipeline.shadersLoaded())
{
gOcclusionProgram.unbind();
}