summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-03-07 01:16:27 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-03-07 01:16:27 +0000
commitc4059553afa289f51f9966b4283b2a62b7103303 (patch)
tree3b1a18de62fc258b847f264ff66d464d8be15034 /indra/newview/lldrawpoolsimple.cpp
parent3d17ddd38baa9fd862114e6f90ce3ce809780b4f (diff)
SKIPPED 58849. merge -r 58856:58859 maintenance -> release
Diffstat (limited to 'indra/newview/lldrawpoolsimple.cpp')
-rw-r--r--indra/newview/lldrawpoolsimple.cpp41
1 files changed, 39 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index fcd466bfc4..8fc3b98908 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -16,6 +16,37 @@
#include "llsky.h"
#include "pipeline.h"
+class LLRenderPassGlow : public LLRenderPass
+{
+public:
+ LLRenderPassGlow(): LLRenderPass(LLRenderPass::PASS_GLOW) { }
+
+ enum
+ {
+ VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_TEXCOORD
+ };
+
+ virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; }
+
+ virtual void prerender() { }
+
+ void render(S32 pass = 0)
+ {
+ LLGLEnable blend(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+ renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask());
+ renderActive(LLRenderPass::PASS_GLOW, getVertexDataMask());
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ }
+
+ void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE)
+ {
+ glColor4ubv(params.mGlowColor.mV);
+ LLRenderPass::pushBatch(params, mask, texture);
+ }
+};
+
LLDrawPoolSimple::LLDrawPoolSimple() :
LLRenderPass(POOL_SIMPLE)
{
@@ -56,7 +87,7 @@ void LLDrawPoolSimple::render(S32 pass)
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
glAlphaFunc(GL_GREATER, 0.01f);
}
-
+
{
LLFastTimer t(LLFastTimer::FTM_RENDER_FULLBRIGHT);
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD | LLVertexBuffer::MAP_COLOR;
@@ -67,10 +98,16 @@ void LLDrawPoolSimple::render(S32 pass)
}
{
+ LLFastTimer t(LLFastTimer::FTM_RENDER_GLOW);
+ glDisableClientState(GL_COLOR_ARRAY);
+ LLRenderPassGlow glow;
+ glow.render();
+ }
+
+ {
LLFastTimer t(LLFastTimer::FTM_RENDER_INVISIBLE);
U32 invisi_mask = LLVertexBuffer::MAP_VERTEX;
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glDisableClientState(GL_COLOR_ARRAY);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
renderInvisible(invisi_mask);
renderActive(LLRenderPass::PASS_INVISIBLE, invisi_mask);