diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2009-02-18 21:10:16 +0000 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2009-02-18 21:10:16 +0000 |
commit | abdc99f21b542c4fea67030ddbd7166c9d1c6c63 (patch) | |
tree | 3e984e405adfdec189ca8a047daca5250737ffbf /indra/newview/llvosky.cpp | |
parent | 34412f0530cf6a411b4de906a8e9da59cbcb3a85 (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/llvosky.cpp')
-rw-r--r-- | indra/newview/llvosky.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 3ec043eb39..c3366cad90 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -213,7 +213,7 @@ void LLSkyTex::init() for (S32 i = 0; i < 2; ++i) { mImageGL[i] = new LLImageGL(FALSE); - mImageGL[i]->setClamp(TRUE, TRUE); + mImageGL[i]->setAddressMode(LLTexUnit::TAM_CLAMP); mImageRaw[i] = new LLImageRaw(sResolution, sResolution, sComponents); initEmpty(i); @@ -231,7 +231,7 @@ void LLSkyTex::restoreGL() for (S32 i = 0; i < 2; i++) { mImageGL[i] = new LLImageGL(FALSE); - mImageGL[i]->setClamp(TRUE, TRUE); + mImageGL[i]->setAddressMode(LLTexUnit::TAM_CLAMP); } } @@ -290,7 +290,7 @@ void LLSkyTex::create(const F32 brightness) void LLSkyTex::createGLImage(S32 which) { mImageGL[which]->createGLTexture(0, mImageRaw[which]); - mImageGL[which]->setClamp(TRUE, TRUE); + mImageGL[which]->setAddressMode(LLTexUnit::TAM_CLAMP); } void LLSkyTex::bindTexture(BOOL curr) @@ -377,11 +377,12 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) mMoon.setIntensity(0.1f * SUN_INTENSITY); mSunTexturep = gImageList.getImage(gSunTextureID, TRUE, TRUE); - mSunTexturep->setClamp(TRUE, TRUE); + mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE); - mMoonTexturep->setClamp(TRUE, TRUE); + mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mBloomTexturep = gImageList.getImage(IMG_BLOOM1); - mBloomTexturep->setClamp(TRUE, TRUE); + mBloomTexturep->setNoDelete() ; + mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mHeavenlyBodyUpdated = FALSE ; } @@ -447,6 +448,7 @@ void LLVOSky::initCubeMap() mCubeMap = new LLCubeMap(); mCubeMap->init(images); } + gGL.getTexUnit(0)->disable(); } @@ -471,11 +473,12 @@ void LLVOSky::restoreGL() mSkyTex[i].restoreGL(); } mSunTexturep = gImageList.getImage(gSunTextureID, TRUE, TRUE); - mSunTexturep->setClamp(TRUE, TRUE); + mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE); - mMoonTexturep->setClamp(TRUE, TRUE); + mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mBloomTexturep = gImageList.getImage(IMG_BLOOM1); - mBloomTexturep->setClamp(TRUE, TRUE); + mBloomTexturep->setNoDelete() ; + mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); calcAtmospherics(); @@ -1153,6 +1156,7 @@ BOOL LLVOSky::updateSky() images.push_back(mShinyTex[side].getImageRaw(TRUE)); } mCubeMap->init(images); + gGL.getTexUnit(0)->disable(); } gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE); @@ -2024,7 +2028,7 @@ void LLVOSky::updateFog(const F32 distance) const BOOL hide_clip_plane = TRUE; LLColor4 target_fog(0.f, 0.2f, 0.5f, 0.f); - const F32 water_height = gAgent.getRegion()->getWaterHeight(); + const F32 water_height = gAgent.getRegion() ? gAgent.getRegion()->getWaterHeight() : 0.f; // LLWorld::getInstance()->getWaterHeight(); F32 camera_height = gAgent.getCameraPositionAgent().mV[2]; |