summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpooltree.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-06 22:43:38 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-06 22:43:38 +0000
commitad332810078a0bbb8fa08fcbfdf3d756de6914f6 (patch)
tree1608b2db5d620d323673607ea7ddadfba9d58bda /indra/newview/lldrawpooltree.cpp
parenta7d9a543e587ffe84b355db7a2e8193bfe6c68b6 (diff)
QAR-650 - Viewer RC 9 merge -> release (post cmake)
merge release@88802 Branch_1-20-Viewer-2-merge-1@89178 -> release
Diffstat (limited to 'indra/newview/lldrawpooltree.cpp')
-rw-r--r--indra/newview/lldrawpooltree.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index eabc0f1268..1ebd0772a8 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -41,7 +41,7 @@
#include "pipeline.h"
#include "llviewercamera.h"
#include "llglslshader.h"
-#include "llglimmediate.h"
+#include "llrender.h"
S32 LLDrawPoolTree::sDiffTex = 0;
static LLGLSLShader* shader = NULL;
@@ -67,7 +67,7 @@ void LLDrawPoolTree::prerender()
void LLDrawPoolTree::beginRenderPass(S32 pass)
{
LLFastTimer t(LLFastTimer::FTM_RENDER_TREES);
- glAlphaFunc(GL_GREATER, 0.5f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
if (LLPipeline::sUnderWaterRender)
{
@@ -106,7 +106,7 @@ void LLDrawPoolTree::render(S32 pass)
void LLDrawPoolTree::endRenderPass(S32 pass)
{
LLFastTimer t(LLFastTimer::FTM_RENDER_TREES);
- glAlphaFunc(GL_GREATER, 0.01f);
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
if (gPipeline.canUseWindLightShadersOnObjects())
{
@@ -125,28 +125,18 @@ void LLDrawPoolTree::renderForSelect()
LLGLSObjectSelectAlpha gls_alpha;
- gGL.blendFunc(GL_ONE, GL_ZERO);
- glAlphaFunc(GL_GREATER, 0.5f);
+ gGL.setSceneBlendType(LLRender::BT_REPLACE);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);
- glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE);
- glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS);
- glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE);
- glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PRIMARY_COLOR_ARB);
- glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA);
+ gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
+ gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
renderTree(TRUE);
- glAlphaFunc(GL_GREATER, 0.01f);
- gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
void LLDrawPoolTree::renderTree(BOOL selecting)