diff options
author | Jacek Antonelli | 2008-12-01 17:39:58 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-01 17:40:06 -0600 |
commit | 7abecb48babe6a6f09bf6692ba55076546cfced9 (patch) | |
tree | 8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/lldrawpoolwlsky.cpp | |
parent | Second Life viewer sources 1.21.6 (diff) | |
download | meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2 meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz |
Second Life viewer sources 1.22.0-RC
Diffstat (limited to 'linden/indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r-- | linden/indra/newview/lldrawpoolwlsky.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/newview/lldrawpoolwlsky.cpp b/linden/indra/newview/lldrawpoolwlsky.cpp index 8802c1f..a8495d5 100644 --- a/linden/indra/newview/lldrawpoolwlsky.cpp +++ b/linden/indra/newview/lldrawpoolwlsky.cpp | |||
@@ -159,7 +159,7 @@ void LLDrawPoolWLSky::renderStars(void) const | |||
159 | // *NOTE: have to have bound the cloud noise texture already since register | 159 | // *NOTE: have to have bound the cloud noise texture already since register |
160 | // combiners blending below requires something to be bound | 160 | // combiners blending below requires something to be bound |
161 | // and we might as well only bind once. | 161 | // and we might as well only bind once. |
162 | //LLGLEnable gl_texture_2d(GL_TEXTURE_2D); | 162 | //gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); |
163 | 163 | ||
164 | gPipeline.disableLights(); | 164 | gPipeline.disableLights(); |
165 | 165 | ||
@@ -202,7 +202,8 @@ void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const | |||
202 | LLGLSBlendFunc blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 202 | LLGLSBlendFunc blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
203 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); | 203 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
204 | 204 | ||
205 | sCloudNoiseTexture->bind(); | 205 | gGL.getTexUnit(0)->bind(sCloudNoiseTexture); |
206 | |||
206 | shader->bind(); | 207 | shader->bind(); |
207 | 208 | ||
208 | /// Render the skydome | 209 | /// Render the skydome |
@@ -223,7 +224,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() | |||
223 | if (gSky.mVOSkyp->getSun().getDraw() && face->getGeomCount()) | 224 | if (gSky.mVOSkyp->getSun().getDraw() && face->getGeomCount()) |
224 | { | 225 | { |
225 | LLImageGL * tex = face->getTexture(); | 226 | LLImageGL * tex = face->getTexture(); |
226 | tex->bind(); | 227 | gGL.getTexUnit(0)->bind(tex); |
227 | LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor()); | 228 | LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor()); |
228 | LLFacePool::LLOverrideFaceColor color_override(this, color); | 229 | LLFacePool::LLOverrideFaceColor color_override(this, color); |
229 | face->renderIndexed(); | 230 | face->renderIndexed(); |
@@ -238,7 +239,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() | |||
238 | // stars register combiners, we bind again here for defensive reasons, | 239 | // stars register combiners, we bind again here for defensive reasons, |
239 | // since LLImageGL::bind detects that it's a noop, and optimizes it out. | 240 | // since LLImageGL::bind detects that it's a noop, and optimizes it out. |
240 | LLImageGL * tex = face->getTexture(); | 241 | LLImageGL * tex = face->getTexture(); |
241 | tex->bind(); | 242 | gGL.getTexUnit(0)->bind(tex); |
242 | LLColor4 color(gSky.mVOSkyp->getMoon().getInterpColor()); | 243 | LLColor4 color(gSky.mVOSkyp->getMoon().getInterpColor()); |
243 | F32 a = gSky.mVOSkyp->getMoon().getDirection().mV[2]; | 244 | F32 a = gSky.mVOSkyp->getMoon().getDirection().mV[2]; |
244 | if (a > 0.f) | 245 | if (a > 0.f) |
@@ -280,7 +281,7 @@ void LLDrawPoolWLSky::render(S32 pass) | |||
280 | // renderStars() requires something to be bound and we might as well only | 281 | // renderStars() requires something to be bound and we might as well only |
281 | // bind the moon's texture once. | 282 | // bind the moon's texture once. |
282 | LLImageGL * tex = gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(); | 283 | LLImageGL * tex = gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(); |
283 | tex->bind(); | 284 | gGL.getTexUnit(0)->bind(tex); |
284 | 285 | ||
285 | renderHeavenlyBodies(); | 286 | renderHeavenlyBodies(); |
286 | 287 | ||
@@ -291,7 +292,7 @@ void LLDrawPoolWLSky::render(S32 pass) | |||
291 | 292 | ||
292 | renderSkyClouds(camHeightLocal); | 293 | renderSkyClouds(camHeightLocal); |
293 | 294 | ||
294 | LLImageGL::unbindTexture(0); | 295 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
295 | } | 296 | } |
296 | 297 | ||
297 | void LLDrawPoolWLSky::prerender() | 298 | void LLDrawPoolWLSky::prerender() |