summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.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/lldrawpoolalpha.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/lldrawpoolalpha.cpp')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 09901984c4..5cc4e37c97 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -37,6 +37,7 @@
#include "llviewercontrol.h"
#include "llcriticaldamp.h"
#include "llfasttimer.h"
+#include "llrender.h"
#include "llcubemap.h"
#include "llsky.h"
@@ -93,7 +94,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass)
{
// Start out with no shaders.
current_shader = target_shader = NULL;
- glUseProgramObjectARB(0);
+ LLGLSLShader::bindNoShader();
}
gPipeline.enableLightsDynamic();
}
@@ -105,7 +106,7 @@ void LLDrawPoolAlpha::endRenderPass( S32 pass )
if(gPipeline.canUseWindLightShaders())
{
- glUseProgramObjectARB(0);
+ LLGLSLShader::bindNoShader();
}
}
@@ -123,7 +124,7 @@ void LLDrawPoolAlpha::render(S32 pass)
{
if(gPipeline.canUseWindLightShaders())
{
- glUseProgramObjectARB(0);
+ LLGLSLShader::bindNoShader();
}
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
glColor4f(1,0,0,1);
@@ -207,18 +208,17 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
{
return;
}
- // *TODO - Uhhh, we should always be doing some type of alpha rejection. These should probably both be 0.01f
- glAlphaFunc(GL_GREATER, 0.f);
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
else
{
if (LLPipeline::sImpostorRender)
{
- glAlphaFunc(GL_GREATER, 0.5f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
}
else
{
- glAlphaFunc(GL_GREATER, 0.01f);
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
}
@@ -230,7 +230,8 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
if (texture && params.mTexture.notNull())
{
- glActiveTextureARB(GL_TEXTURE0_ARB);
+ llassert_always(gGL.getTexUnit(0)) ;
+ gGL.getTexUnit(0)->activate();
params.mTexture->bind();
params.mTexture->addTextureStats(params.mVSize);
if (params.mTextureMatrix)
@@ -283,7 +284,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
}
else if (!use_shaders && current_shader != NULL)
{
- glUseProgramObjectARB(0);
+ LLGLSLShader::bindNoShader();
current_shader = NULL;
}