summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-02-22 13:29:22 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-02-22 13:29:22 -0700
commite216fabde0b23923a3fff5c5edcb6a6a0be10ddd (patch)
treee5ebd5c2ee0d74fbdeb778404dbe0964da5ef910 /indra/newview
parent1a79aeca54db6ee5bf1fb2968c2642f8a3306091 (diff)
parent2ebcf802cbec59b4d9fe404af5bd125818d4eefa (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llviewercontrol.cpp10
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/pipeline.cpp20
-rw-r--r--indra/newview/pipeline.h1
5 files changed, 42 insertions, 2 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6630d8f400..a010524091 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8451,6 +8451,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RenderVBOMappingDisable</key>
+ <map>
+ <key>Comment</key>
+ <string>Disable VBO glMapBufferARB</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderUseStreamVBO</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 8c5a52c187..3c53e54203 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -309,6 +309,15 @@ static bool handleRenderUseVBOChanged(const LLSD& newvalue)
return true;
}
+static bool handleRenderUseVBOMappingChanged(const LLSD& newvalue)
+{
+ if (gPipeline.isInit())
+ {
+ gPipeline.setDisableVBOMapping(newvalue.asBoolean());
+ }
+ return true;
+}
+
static bool handleWLSkyDetailChanged(const LLSD&)
{
if (gSky.mVOWLSkyp.notNull())
@@ -589,6 +598,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _2));
+ gSavedSettings.getControl("RenderVBOMappingDisable")->getSignal()->connect(boost::bind(&handleRenderUseVBOMappingChanged, _2));
gSavedSettings.getControl("RenderUseStreamVBO")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _2));
gSavedSettings.getControl("NumpadControl")->getSignal()->connect(boost::bind(&handleNumpadControlChanged, _2));
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 274dbe2cc8..0028ced6c8 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1477,7 +1477,7 @@ LLViewerWindow::LLViewerWindow(
{
gSavedSettings.setBOOL("RenderVBOEnable", FALSE);
}
- LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"));
+ LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable"));
if (LLFeatureManager::getInstance()->isSafe()
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
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);
}
}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index cef3d87f36..e99b0d71e3 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -111,6 +111,7 @@ public:
void resetVertexBuffers(LLDrawable* drawable);
void setUseVBO(BOOL use_vbo);
+ void setDisableVBOMapping(BOOL no_vbo_mapping);
void generateImpostor(LLVOAvatar* avatar);
void bindScreenToTexture();
void renderBloom(BOOL for_snapshot, F32 zoom_factor = 1.f, int subfield = 0);