summaryrefslogtreecommitdiff
path: root/indra/newview/llsky.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2009-02-18 21:10:16 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2009-02-18 21:10:16 +0000
commitabdc99f21b542c4fea67030ddbd7166c9d1c6c63 (patch)
tree3e984e405adfdec189ca8a047daca5250737ffbf /indra/newview/llsky.cpp
parent34412f0530cf6a411b4de906a8e9da59cbcb3a85 (diff)
Merge of QAR-1267 to trunk. This was a combo merge of QAR-1175 (maint-render-9) and QAR-1236 (dll-msvcrt-2)
svn merge -r 109838:112264 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-render/maint-render-9-merge-r109833
Diffstat (limited to 'indra/newview/llsky.cpp')
-rw-r--r--indra/newview/llsky.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp
index 24fea645d4..b779aa0f83 100644
--- a/indra/newview/llsky.cpp
+++ b/indra/newview/llsky.cpp
@@ -285,18 +285,37 @@ LLColor4U LLSky::getFadeColor() const
void LLSky::init(const LLVector3 &sun_direction)
{
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
+
mVOWLSkyp = static_cast<LLVOWLSky*>(gObjectList.createObjectViewer(LLViewerObject::LL_VO_WL_SKY, NULL));
mVOWLSkyp->initSunDirection(sun_direction, LLVector3::zero);
- gPipeline.addObject(mVOWLSkyp.get());
+ gPipeline.createObject(mVOWLSkyp.get());
+
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
mVOSkyp = (LLVOSky *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_SKY, NULL);
+
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
+
mVOSkyp->initSunDirection(sun_direction, LLVector3());
- gPipeline.addObject((LLViewerObject *)mVOSkyp);
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
+
+ gPipeline.createObject((LLViewerObject *)mVOSkyp);
+
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
mVOGroundp = (LLVOGround*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_GROUND, NULL);
LLVOGround *groundp = mVOGroundp;
- gPipeline.addObject((LLViewerObject *)groundp);
+ gPipeline.createObject((LLViewerObject *)groundp);
+
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio"));
@@ -309,6 +328,8 @@ void LLSky::init(const LLVector3 &sun_direction)
// Get the parameters.
mSunDefaultPosition = gSavedSettings.getVector3("SkySunDefaultPosition");
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
if (gSavedSettings.getBOOL("SkyOverrideSimSunPosition") || mOverrideSimSunPosition)
{
@@ -319,6 +340,8 @@ void LLSky::init(const LLVector3 &sun_direction)
setSunDirection(sun_direction, LLVector3(0.f, 0.f, 0.f));
}
+ LLGLState::checkStates();
+ LLGLState::checkTextureChannels();
mUpdatedThisFrame = TRUE;
}