diff options
author | Dave Parks <davep@lindenlab.com> | 2012-04-17 17:44:39 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-04-17 17:44:39 -0500 |
commit | 70ade9f538f6aa9ab0915c0a7040bbf20dfb98a1 (patch) | |
tree | b7aba8c2692546ca37081846cfc15cd1706f3c39 /indra/newview/llvovolume.cpp | |
parent | 1de63bec5089e64b1bf6bc7eaad95d5210f0fd05 (diff) |
MAINT-775 WIP on crash when exploring Insilico -- don't hold onto off-screen vertex buffers for more than a few seconds.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 16b61496a6..f656e61cca 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -682,7 +682,21 @@ void LLVOVolume::updateTextures() const F32 TEXTURE_AREA_REFRESH_TIME = 5.f; // seconds if (mTextureUpdateTimer.getElapsedTimeF32() > TEXTURE_AREA_REFRESH_TIME) { - updateTextureVirtualSize(); + updateTextureVirtualSize(); + + if (mDrawable.notNull() && !isVisible()) + { //delete vertex buffer to free up some VRAM + LLSpatialGroup* group = mDrawable->getSpatialGroup(); + if (group) + { + group->destroyGL(true); + + //flag the group as having changed draw info state so it gets a rebuild next time + //it becomes visible + group->setState(LLSpatialGroup::NEW_DRAWINFO); + } + } + } } |