summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-02-15 14:12:58 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-02-15 14:12:58 -0700
commitf13884e528c327dbbc638b72322e08b544d0f6c0 (patch)
tree6d6405932d386b3f6b25ab9ae8347e3454758744 /indra/newview/pipeline.cpp
parentb6571ee127f22316be8b9e32c771f8bfb35a0b00 (diff)
partial fix for SH-895/STORM-336: memory leaking. fixed vertex buffer caused leaking.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 39bc354250..13e537fae5 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5313,7 +5313,25 @@ void LLPipeline::setUseVBO(BOOL use_vbo)
}
resetVertexBuffers();
- LLVertexBuffer::initClass(use_vbo);
+ LLVertexBuffer::initClass(use_vbo, gSavedSettings.getBOOL("RenderVBOMappingDisable"));
+ }
+}
+
+void LLPipeline::setDisableVBOMapping(BOOL no_vbo_mapping)
+{
+ if (LLVertexBuffer::sEnableVBOs && no_vbo_mapping != LLVertexBuffer::sDisableVBOMapping)
+ {
+ if (no_vbo_mapping)
+ {
+ llinfos << "Disabling VBO glMapBufferARB." << llendl;
+ }
+ else
+ {
+ llinfos << "Enabling VBO glMapBufferARB." << llendl;
+ }
+
+ resetVertexBuffers();
+ LLVertexBuffer::initClass(true, no_vbo_mapping);
}
}