summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-18 20:31:26 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-18 20:31:26 +0100
commit862b8f72dc4d89e88b0c03992dad393aff9451a5 (patch)
treed64e3926ca9e8329f50867135dd3c41606fbed31
parent08dd04aa98f9071d87a26573fb2807aaac1852eb (diff)
SL-9685
Make sure legacy opaque water texture ID is assigned so it can be bound for lowest graphics use.
-rw-r--r--indra/newview/lldrawpoolwater.cpp4
-rw-r--r--indra/newview/lldrawpoolwater.h2
-rw-r--r--indra/newview/llsettingsvo.cpp1
3 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 7f1601e604..4dd0d3ec98 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -76,10 +76,10 @@ void LLDrawPoolWater::setTransparentTextures(const LLUUID& transparentTextureId,
mWaterImagep[1]->addTextureStats(1024.f*1024.f);
}
-void LLDrawPoolWater::setOpaqueTexture()
+void LLDrawPoolWater::setOpaqueTexture(const LLUUID& opaqueTextureId)
{
LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater();
- mOpaqueWaterImagep = LLViewerTextureManager::getFetchedTexture(pwater->GetDefaultOpaqueTextureAssetId());
+ mOpaqueWaterImagep = LLViewerTextureManager::getFetchedTexture(opaqueTextureId);
mOpaqueWaterImagep->addTextureStats(1024.f*1024.f);
}
diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h
index 3c1587885e..f14ac1f6d2 100644
--- a/indra/newview/lldrawpoolwater.h
+++ b/indra/newview/lldrawpoolwater.h
@@ -83,7 +83,7 @@ public:
void shade();
void setTransparentTextures(const LLUUID& transparentTextureId, const LLUUID& nextTransparentTextureId);
- void setOpaqueTexture();
+ void setOpaqueTexture(const LLUUID& opaqueTextureId);
void setNormalMaps(const LLUUID& normalMapId, const LLUUID& nextNormalMapId);
protected:
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index b16ba65c01..583adcb024 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -851,6 +851,7 @@ void LLSettingsVOWater::updateSettings()
if (pwaterpool)
{
pwaterpool->setTransparentTextures(getTransparentTextureID(), getNextTransparentTextureID());
+ pwaterpool->setOpaqueTexture(GetDefaultOpaqueTextureAssetId());
pwaterpool->setNormalMaps(getNormalMapID(), getNextNormalMapID());
}
}