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/lldrawpoolwlsky.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/lldrawpoolwlsky.cpp')
-rw-r--r-- | linden/indra/newview/lldrawpoolwlsky.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/linden/indra/newview/lldrawpoolwlsky.cpp b/linden/indra/newview/lldrawpoolwlsky.cpp index e10cd0a..01e1af0 100644 --- a/linden/indra/newview/lldrawpoolwlsky.cpp +++ b/linden/indra/newview/lldrawpoolwlsky.cpp | |||
@@ -44,7 +44,7 @@ | |||
44 | #include "llagent.h" | 44 | #include "llagent.h" |
45 | #include "llviewerregion.h" | 45 | #include "llviewerregion.h" |
46 | #include "llface.h" | 46 | #include "llface.h" |
47 | #include "llglimmediate.h" | 47 | #include "llrender.h" |
48 | 48 | ||
49 | LLPointer<LLImageGL> LLDrawPoolWLSky::sCloudNoiseTexture = NULL; | 49 | LLPointer<LLImageGL> LLDrawPoolWLSky::sCloudNoiseTexture = NULL; |
50 | 50 | ||
@@ -153,7 +153,7 @@ void LLDrawPoolWLSky::renderStars(void) const | |||
153 | { | 153 | { |
154 | LLGLSPipelineSkyBox gls_sky; | 154 | LLGLSPipelineSkyBox gls_sky; |
155 | LLGLEnable blend(GL_BLEND); | 155 | LLGLEnable blend(GL_BLEND); |
156 | gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 156 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
157 | 157 | ||
158 | // *NOTE: have to have bound the cloud noise texture already since register | 158 | // *NOTE: have to have bound the cloud noise texture already since register |
159 | // combiners blending below requires something to be bound | 159 | // combiners blending below requires something to be bound |
@@ -176,16 +176,8 @@ void LLDrawPoolWLSky::renderStars(void) const | |||
176 | 176 | ||
177 | // gl_FragColor.rgb = gl_Color.rgb; | 177 | // gl_FragColor.rgb = gl_Color.rgb; |
178 | // gl_FragColor.a = gl_Color.a * star_alpha.a; | 178 | // gl_FragColor.a = gl_Color.a * star_alpha.a; |
179 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); | 179 | gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); |
180 | glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); | 180 | gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_PREV_ALPHA, LLTexUnit::TBS_CONST_ALPHA); |
181 | glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); | ||
182 | glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); | ||
183 | glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); | ||
184 | glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS); | ||
185 | glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); | ||
186 | glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_CONSTANT); | ||
187 | glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); | ||
188 | glTexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 2.0f); | ||
189 | glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV); | 181 | glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV); |
190 | 182 | ||
191 | gSky.mVOWLSkyp->drawStars(); | 183 | gSky.mVOWLSkyp->drawStars(); |
@@ -193,8 +185,7 @@ void LLDrawPoolWLSky::renderStars(void) const | |||
193 | glPointSize(1.f); | 185 | glPointSize(1.f); |
194 | 186 | ||
195 | // and disable the combiner states | 187 | // and disable the combiner states |
196 | glTexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 1.0f); | 188 | gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); |
197 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | ||
198 | } | 189 | } |
199 | 190 | ||
200 | void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const | 191 | void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const |
@@ -208,7 +199,7 @@ void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const | |||
208 | 199 | ||
209 | LLGLEnable blend(GL_BLEND); | 200 | LLGLEnable blend(GL_BLEND); |
210 | LLGLSBlendFunc blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 201 | LLGLSBlendFunc blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
211 | glAlphaFunc(GL_GREATER, 0.01f); | 202 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
212 | 203 | ||
213 | sCloudNoiseTexture->bind(); | 204 | sCloudNoiseTexture->bind(); |
214 | shader->bind(); | 205 | shader->bind(); |