aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llsky.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llsky.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/llsky.cpp')
-rw-r--r--linden/indra/newview/llsky.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/linden/indra/newview/llsky.cpp b/linden/indra/newview/llsky.cpp
index 3e67119..b779aa0 100644
--- a/linden/indra/newview/llsky.cpp
+++ b/linden/indra/newview/llsky.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -284,18 +285,37 @@ LLColor4U LLSky::getFadeColor() const
284 285
285void LLSky::init(const LLVector3 &sun_direction) 286void LLSky::init(const LLVector3 &sun_direction)
286{ 287{
288 LLGLState::checkStates();
289 LLGLState::checkTextureChannels();
290
287 mVOWLSkyp = static_cast<LLVOWLSky*>(gObjectList.createObjectViewer(LLViewerObject::LL_VO_WL_SKY, NULL)); 291 mVOWLSkyp = static_cast<LLVOWLSky*>(gObjectList.createObjectViewer(LLViewerObject::LL_VO_WL_SKY, NULL));
288 mVOWLSkyp->initSunDirection(sun_direction, LLVector3::zero); 292 mVOWLSkyp->initSunDirection(sun_direction, LLVector3::zero);
289 gPipeline.addObject(mVOWLSkyp.get()); 293 gPipeline.createObject(mVOWLSkyp.get());
294
295 LLGLState::checkStates();
296 LLGLState::checkTextureChannels();
290 297
291 mVOSkyp = (LLVOSky *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_SKY, NULL); 298 mVOSkyp = (LLVOSky *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_SKY, NULL);
299
300 LLGLState::checkStates();
301 LLGLState::checkTextureChannels();
302
292 mVOSkyp->initSunDirection(sun_direction, LLVector3()); 303 mVOSkyp->initSunDirection(sun_direction, LLVector3());
293 gPipeline.addObject((LLViewerObject *)mVOSkyp);
294 304
305 LLGLState::checkStates();
306 LLGLState::checkTextureChannels();
307
308 gPipeline.createObject((LLViewerObject *)mVOSkyp);
309
310 LLGLState::checkStates();
311 LLGLState::checkTextureChannels();
295 312
296 mVOGroundp = (LLVOGround*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_GROUND, NULL); 313 mVOGroundp = (LLVOGround*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_GROUND, NULL);
297 LLVOGround *groundp = mVOGroundp; 314 LLVOGround *groundp = mVOGroundp;
298 gPipeline.addObject((LLViewerObject *)groundp); 315 gPipeline.createObject((LLViewerObject *)groundp);
316
317 LLGLState::checkStates();
318 LLGLState::checkTextureChannels();
299 319
300 gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio")); 320 gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio"));
301 321
@@ -308,6 +328,8 @@ void LLSky::init(const LLVector3 &sun_direction)
308 // Get the parameters. 328 // Get the parameters.
309 mSunDefaultPosition = gSavedSettings.getVector3("SkySunDefaultPosition"); 329 mSunDefaultPosition = gSavedSettings.getVector3("SkySunDefaultPosition");
310 330
331 LLGLState::checkStates();
332 LLGLState::checkTextureChannels();
311 333
312 if (gSavedSettings.getBOOL("SkyOverrideSimSunPosition") || mOverrideSimSunPosition) 334 if (gSavedSettings.getBOOL("SkyOverrideSimSunPosition") || mOverrideSimSunPosition)
313 { 335 {
@@ -318,6 +340,8 @@ void LLSky::init(const LLVector3 &sun_direction)
318 setSunDirection(sun_direction, LLVector3(0.f, 0.f, 0.f)); 340 setSunDirection(sun_direction, LLVector3(0.f, 0.f, 0.f));
319 } 341 }
320 342
343 LLGLState::checkStates();
344 LLGLState::checkTextureChannels();
321 345
322 mUpdatedThisFrame = TRUE; 346 mUpdatedThisFrame = TRUE;
323} 347}