summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 6ff65c7ed0..917b6fafbc 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -47,7 +47,7 @@
#include "llface.h"
#include "llrender.h"
-LLPointer<LLImageGL> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
+LLPointer<LLViewerTexture> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
LLPointer<LLImageRaw> LLDrawPoolWLSky::sCloudNoiseRawImage = NULL;
@@ -71,7 +71,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f);
- LLImageGL::create(sCloudNoiseTexture, sCloudNoiseRawImage, TRUE);
+ sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
LLWLParamManager::instance()->propagateParameters();
}
@@ -83,7 +83,7 @@ LLDrawPoolWLSky::~LLDrawPoolWLSky()
sCloudNoiseRawImage = NULL;
}
-LLViewerImage *LLDrawPoolWLSky::getDebugTexture()
+LLViewerTexture *LLDrawPoolWLSky::getDebugTexture()
{
return NULL;
}
@@ -224,7 +224,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
LLFace * face = gSky.mVOSkyp->mFace[LLVOSky::FACE_SUN];
if (gSky.mVOSkyp->getSun().getDraw() && face->getGeomCount())
{
- LLImageGL * tex = face->getTexture();
+ LLViewerTexture * tex = face->getTexture();
gGL.getTexUnit(0)->bind(tex);
LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor());
LLFacePool::LLOverrideFaceColor color_override(this, color);
@@ -239,8 +239,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
// *NOTE: even though we already bound this texture above for the
// stars register combiners, we bind again here for defensive reasons,
// since LLImageGL::bind detects that it's a noop, and optimizes it out.
- LLImageGL * tex = face->getTexture();
- gGL.getTexUnit(0)->bind(tex);
+ gGL.getTexUnit(0)->bind(face->getTexture());
LLColor4 color(gSky.mVOSkyp->getMoon().getInterpColor());
F32 a = gSky.mVOSkyp->getMoon().getDirection().mV[2];
if (a > 0.f)
@@ -280,9 +279,8 @@ void LLDrawPoolWLSky::render(S32 pass)
// *NOTE: have to bind a texture here since register combiners blending in
// renderStars() requires something to be bound and we might as well only
- // bind the moon's texture once.
- LLImageGL * tex = gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture();
- gGL.getTexUnit(0)->bind(tex);
+ // bind the moon's texture once.
+ gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture());
renderHeavenlyBodies();
@@ -306,7 +304,7 @@ LLDrawPoolWLSky *LLDrawPoolWLSky::instancePool()
return new LLDrawPoolWLSky();
}
-LLViewerImage* LLDrawPoolWLSky::getTexture()
+LLViewerTexture* LLDrawPoolWLSky::getTexture()
{
return NULL;
}
@@ -324,5 +322,5 @@ void LLDrawPoolWLSky::cleanupGL()
//static
void LLDrawPoolWLSky::restoreGL()
{
- LLImageGL::create(sCloudNoiseTexture, sCloudNoiseRawImage, TRUE);
+ sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
}