From abdc99f21b542c4fea67030ddbd7166c9d1c6c63 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 18 Feb 2009 21:10:16 +0000 Subject: 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 --- indra/newview/llsky.cpp | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsky.cpp') 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(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; } -- cgit v1.2.3