diff options
Diffstat (limited to 'indra/newview/lldrawpoolsimple.cpp')
-rw-r--r-- | indra/newview/lldrawpoolsimple.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index eec4ee6bac..582e462871 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -80,6 +80,18 @@ void LLDrawPoolGlow::endPostDeferredPass(S32 pass) LLRenderPass::endRenderPass(pass); } +S32 LLDrawPoolGlow::getNumPasses() +{ + if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0) + { + return 1; + } + else + { + return 0; + } +} + void LLDrawPoolGlow::render(S32 pass) { LLFastTimer t(FTM_RENDER_GLOW); @@ -93,39 +105,29 @@ void LLDrawPoolGlow::render(S32 pass) U32 shader_level = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT); - if (shader_level > 0 && fullbright_shader) - { - fullbright_shader->bind(); - } - else - { - gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); - } + //should never get here without basic shaders enabled + llassert(shader_level > 0); + + LLGLSLShader* shader = LLPipeline::sUnderWaterRender ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram; + shader->bind(); LLGLDepthTest depth(GL_TRUE, GL_FALSE); gGL.setColorMask(false, true); - if (shader_level > 1) - { - pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); - } - else - { - renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask()); - } + pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); gGL.setColorMask(true, false); gGL.setSceneBlendType(LLRender::BT_ALPHA); if (shader_level > 0 && fullbright_shader) { - fullbright_shader->unbind(); + shader->unbind(); } } void LLDrawPoolGlow::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures) { - glColor4ubv(params.mGlowColor.mV); + //gGL.diffuseColor4ubv(params.mGlowColor.mV); LLRenderPass::pushBatch(params, mask, texture, batch_textures); } |