summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp16
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);
+ }
+ }
+
}
}