diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/lldrawpoolsimple.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/newview/lldrawpoolsimple.cpp')
-rw-r--r-- | linden/indra/newview/lldrawpoolsimple.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/newview/lldrawpoolsimple.cpp b/linden/indra/newview/lldrawpoolsimple.cpp index 330ac57..d580e97 100644 --- a/linden/indra/newview/lldrawpoolsimple.cpp +++ b/linden/indra/newview/lldrawpoolsimple.cpp | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "pipeline.h" | 41 | #include "pipeline.h" |
42 | #include "llspatialpartition.h" | 42 | #include "llspatialpartition.h" |
43 | #include "llglslshader.h" | 43 | #include "llglslshader.h" |
44 | #include "llglimmediate.h" | 44 | #include "llrender.h" |
45 | 45 | ||
46 | 46 | ||
47 | static LLGLSLShader* simple_shader = NULL; | 47 | static LLGLSLShader* simple_shader = NULL; |
@@ -52,7 +52,7 @@ void LLDrawPoolGlow::render(S32 pass) | |||
52 | LLFastTimer t(LLFastTimer::FTM_RENDER_GLOW); | 52 | LLFastTimer t(LLFastTimer::FTM_RENDER_GLOW); |
53 | LLGLEnable blend(GL_BLEND); | 53 | LLGLEnable blend(GL_BLEND); |
54 | LLGLDisable test(GL_ALPHA_TEST); | 54 | LLGLDisable test(GL_ALPHA_TEST); |
55 | gGL.blendFunc(GL_ONE, GL_ONE); | 55 | gGL.setSceneBlendType(LLRender::BT_ADD); |
56 | 56 | ||
57 | U32 shader_level = LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_OBJECT); | 57 | U32 shader_level = LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_OBJECT); |
58 | 58 | ||
@@ -66,11 +66,11 @@ void LLDrawPoolGlow::render(S32 pass) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | LLGLDepthTest depth(GL_TRUE, GL_FALSE); | 68 | LLGLDepthTest depth(GL_TRUE, GL_FALSE); |
69 | glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); | 69 | gGL.setColorMask(false, true); |
70 | renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask()); | 70 | renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask()); |
71 | 71 | ||
72 | glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); | 72 | gGL.setColorMask(true, false); |
73 | gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 73 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
74 | 74 | ||
75 | if (shader_level > 0 && fullbright_shader) | 75 | if (shader_level > 0 && fullbright_shader) |
76 | { | 76 | { |
@@ -120,7 +120,7 @@ void LLDrawPoolSimple::beginRenderPass(S32 pass) | |||
120 | // don't use shaders! | 120 | // don't use shaders! |
121 | if (gGLManager.mHasShaderObjects) | 121 | if (gGLManager.mHasShaderObjects) |
122 | { | 122 | { |
123 | glUseProgramObjectARB(0); | 123 | LLGLSLShader::bindNoShader(); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | } | 126 | } |
@@ -140,7 +140,7 @@ void LLDrawPoolSimple::render(S32 pass) | |||
140 | { | 140 | { |
141 | LLGLDisable blend(GL_BLEND); | 141 | LLGLDisable blend(GL_BLEND); |
142 | LLGLState alpha_test(GL_ALPHA_TEST, gPipeline.canUseWindLightShadersOnObjects()); | 142 | LLGLState alpha_test(GL_ALPHA_TEST, gPipeline.canUseWindLightShadersOnObjects()); |
143 | glAlphaFunc(GL_GREATER, 0.5f); | 143 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); |
144 | 144 | ||
145 | { //render simple | 145 | { //render simple |
146 | LLFastTimer t(LLFastTimer::FTM_RENDER_SIMPLE); | 146 | LLFastTimer t(LLFastTimer::FTM_RENDER_SIMPLE); |
@@ -152,7 +152,7 @@ void LLDrawPoolSimple::render(S32 pass) | |||
152 | LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS); | 152 | LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS); |
153 | LLGLEnable test(GL_ALPHA_TEST); | 153 | LLGLEnable test(GL_ALPHA_TEST); |
154 | LLGLEnable blend(GL_BLEND); | 154 | LLGLEnable blend(GL_BLEND); |
155 | gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 155 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
156 | //render grass | 156 | //render grass |
157 | LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask()); | 157 | LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask()); |
158 | } | 158 | } |
@@ -172,6 +172,6 @@ void LLDrawPoolSimple::render(S32 pass) | |||
172 | renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask); | 172 | renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask); |
173 | } | 173 | } |
174 | 174 | ||
175 | glAlphaFunc(GL_GREATER, 0.01f); | 175 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
176 | } | 176 | } |
177 | 177 | ||