aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lldrawpoolalpha.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/newview/lldrawpoolalpha.cpp b/linden/indra/newview/lldrawpoolalpha.cpp
index 95f8502..ca8f3b4 100644
--- a/linden/indra/newview/lldrawpoolalpha.cpp
+++ b/linden/indra/newview/lldrawpoolalpha.cpp
@@ -37,6 +37,7 @@
37#include "llviewercontrol.h" 37#include "llviewercontrol.h"
38#include "llcriticaldamp.h" 38#include "llcriticaldamp.h"
39#include "llfasttimer.h" 39#include "llfasttimer.h"
40#include "llrender.h"
40 41
41#include "llcubemap.h" 42#include "llcubemap.h"
42#include "llsky.h" 43#include "llsky.h"
@@ -93,7 +94,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass)
93 { 94 {
94 // Start out with no shaders. 95 // Start out with no shaders.
95 current_shader = target_shader = NULL; 96 current_shader = target_shader = NULL;
96 glUseProgramObjectARB(0); 97 LLGLSLShader::bindNoShader();
97 } 98 }
98 gPipeline.enableLightsDynamic(); 99 gPipeline.enableLightsDynamic();
99} 100}
@@ -105,7 +106,7 @@ void LLDrawPoolAlpha::endRenderPass( S32 pass )
105 106
106 if(gPipeline.canUseWindLightShaders()) 107 if(gPipeline.canUseWindLightShaders())
107 { 108 {
108 glUseProgramObjectARB(0); 109 LLGLSLShader::bindNoShader();
109 } 110 }
110} 111}
111 112
@@ -123,7 +124,7 @@ void LLDrawPoolAlpha::render(S32 pass)
123 { 124 {
124 if(gPipeline.canUseWindLightShaders()) 125 if(gPipeline.canUseWindLightShaders())
125 { 126 {
126 glUseProgramObjectARB(0); 127 LLGLSLShader::bindNoShader();
127 } 128 }
128 gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); 129 gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
129 glColor4f(1,0,0,1); 130 glColor4f(1,0,0,1);
@@ -207,18 +208,17 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
207 { 208 {
208 return; 209 return;
209 } 210 }
210 // *TODO - Uhhh, we should always be doing some type of alpha rejection. These should probably both be 0.01f 211 gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
211 glAlphaFunc(GL_GREATER, 0.f);
212 } 212 }
213 else 213 else
214 { 214 {
215 if (LLPipeline::sImpostorRender) 215 if (LLPipeline::sImpostorRender)
216 { 216 {
217 glAlphaFunc(GL_GREATER, 0.5f); 217 gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
218 } 218 }
219 else 219 else
220 { 220 {
221 glAlphaFunc(GL_GREATER, 0.01f); 221 gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
222 } 222 }
223 } 223 }
224 224
@@ -230,7 +230,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
230 230
231 if (texture && params.mTexture.notNull()) 231 if (texture && params.mTexture.notNull())
232 { 232 {
233 glActiveTextureARB(GL_TEXTURE0_ARB); 233 gGL.getTexUnit(0)->activate();
234 params.mTexture->bind(); 234 params.mTexture->bind();
235 params.mTexture->addTextureStats(params.mVSize); 235 params.mTexture->addTextureStats(params.mVSize);
236 if (params.mTextureMatrix) 236 if (params.mTextureMatrix)
@@ -283,7 +283,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
283 } 283 }
284 else if (!use_shaders && current_shader != NULL) 284 else if (!use_shaders && current_shader != NULL)
285 { 285 {
286 glUseProgramObjectARB(0); 286 LLGLSLShader::bindNoShader();
287 current_shader = NULL; 287 current_shader = NULL;
288 } 288 }
289 289