diff options
Diffstat (limited to 'linden/indra/newview/lldrawpooltree.cpp')
-rw-r--r-- | linden/indra/newview/lldrawpooltree.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/linden/indra/newview/lldrawpooltree.cpp b/linden/indra/newview/lldrawpooltree.cpp index fd0a83c..285b313 100644 --- a/linden/indra/newview/lldrawpooltree.cpp +++ b/linden/indra/newview/lldrawpooltree.cpp | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "pipeline.h" | 41 | #include "pipeline.h" |
42 | #include "llviewercamera.h" | 42 | #include "llviewercamera.h" |
43 | #include "llglslshader.h" | 43 | #include "llglslshader.h" |
44 | #include "llglimmediate.h" | 44 | #include "llrender.h" |
45 | 45 | ||
46 | S32 LLDrawPoolTree::sDiffTex = 0; | 46 | S32 LLDrawPoolTree::sDiffTex = 0; |
47 | static LLGLSLShader* shader = NULL; | 47 | static LLGLSLShader* shader = NULL; |
@@ -67,7 +67,7 @@ void LLDrawPoolTree::prerender() | |||
67 | void LLDrawPoolTree::beginRenderPass(S32 pass) | 67 | void LLDrawPoolTree::beginRenderPass(S32 pass) |
68 | { | 68 | { |
69 | LLFastTimer t(LLFastTimer::FTM_RENDER_TREES); | 69 | LLFastTimer t(LLFastTimer::FTM_RENDER_TREES); |
70 | glAlphaFunc(GL_GREATER, 0.5f); | 70 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); |
71 | 71 | ||
72 | if (LLPipeline::sUnderWaterRender) | 72 | if (LLPipeline::sUnderWaterRender) |
73 | { | 73 | { |
@@ -106,7 +106,7 @@ void LLDrawPoolTree::render(S32 pass) | |||
106 | void LLDrawPoolTree::endRenderPass(S32 pass) | 106 | void LLDrawPoolTree::endRenderPass(S32 pass) |
107 | { | 107 | { |
108 | LLFastTimer t(LLFastTimer::FTM_RENDER_TREES); | 108 | LLFastTimer t(LLFastTimer::FTM_RENDER_TREES); |
109 | glAlphaFunc(GL_GREATER, 0.01f); | 109 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
110 | 110 | ||
111 | if (gPipeline.canUseWindLightShadersOnObjects()) | 111 | if (gPipeline.canUseWindLightShadersOnObjects()) |
112 | { | 112 | { |
@@ -125,28 +125,18 @@ void LLDrawPoolTree::renderForSelect() | |||
125 | 125 | ||
126 | LLGLSObjectSelectAlpha gls_alpha; | 126 | LLGLSObjectSelectAlpha gls_alpha; |
127 | 127 | ||
128 | gGL.blendFunc(GL_ONE, GL_ZERO); | 128 | gGL.setSceneBlendType(LLRender::BT_REPLACE); |
129 | glAlphaFunc(GL_GREATER, 0.5f); | 129 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); |
130 | 130 | ||
131 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); | 131 | gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); |
132 | glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); | 132 | gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); |
133 | glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); | ||
134 | |||
135 | glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); | ||
136 | glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); | ||
137 | |||
138 | glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); | ||
139 | glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); | ||
140 | |||
141 | glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); | ||
142 | glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); | ||
143 | 133 | ||
144 | renderTree(TRUE); | 134 | renderTree(TRUE); |
145 | 135 | ||
146 | glAlphaFunc(GL_GREATER, 0.01f); | 136 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
147 | gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 137 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
148 | 138 | ||
149 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | 139 | gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); |
150 | } | 140 | } |
151 | 141 | ||
152 | void LLDrawPoolTree::renderTree(BOOL selecting) | 142 | void LLDrawPoolTree::renderTree(BOOL selecting) |