diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 13:12:05 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 13:12:05 +0300 |
commit | a4b1c0330a6a8e43bf4c41c5b0c836bd1dee2268 (patch) | |
tree | 6d68d3e3f665d60fa946bd24a4b324b5e63339fb /indra/newview/llworld.cpp | |
parent | a8df6762ff88458916397b9707f6954b2714e14d (diff) | |
parent | d7f1c88c35849e56f5b352f13c16a08467d1533b (diff) |
Merge branch 'master' into DRTVWR-482
# Conflicts:
# indra/newview/app_settings/shaders/class1/objects/previewV.glsl
# indra/newview/lldynamictexture.cpp
# indra/newview/llfloatermodelpreview.cpp
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r-- | indra/newview/llworld.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 89f5eb86b3..8989bae96a 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -873,6 +873,57 @@ void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_heigh } } +void LLWorld::precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool include_void_water) +{ + if (!gAgent.getRegion()) + { + return; + } + + if (mRegionList.empty()) + { + LL_WARNS() << "No regions!" << LL_ENDL; + return; + } + + for (region_list_t::iterator iter = mRegionList.begin(); + iter != mRegionList.end(); ++iter) + { + LLViewerRegion* regionp = *iter; + LLVOWater* waterp = regionp->getLand().getWaterObj(); + if (waterp && waterp->mDrawable) + { + waterp->mDrawable->setVisible(camera); + cull->pushDrawable(waterp->mDrawable); + } + } + + if (include_void_water) + { + for (std::list<LLPointer<LLVOWater> >::iterator iter = mHoleWaterObjects.begin(); + iter != mHoleWaterObjects.end(); ++ iter) + { + LLVOWater* waterp = (*iter).get(); + if (waterp && waterp->mDrawable) + { + waterp->mDrawable->setVisible(camera); + cull->pushDrawable(waterp->mDrawable); + } + } + } + + S32 dir; + for (dir = 0; dir < 8; dir++) + { + LLVOWater* waterp = mEdgeWaterObjects[dir]; + if (waterp && waterp->mDrawable) + { + waterp->mDrawable->setVisible(camera); + cull->pushDrawable(waterp->mDrawable); + } + } +} + void LLWorld::updateWaterObjects() { if (!gAgent.getRegion()) |