diff options
author | Dave Parks <davep@lindenlab.com> | 2011-02-22 18:36:50 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-02-22 18:36:50 -0600 |
commit | e55e91a5a546832b79643fdcd2208b5e4f62b6df (patch) | |
tree | 2b0fbc27be86c3db4c7866b78d150586b3e50fe7 /indra/newview/pipeline.cpp | |
parent | b53ffe4eae9700ad78f01cfec3458b5611330027 (diff) |
SH-874 Better VBO usage hints, most notably don't use VBOs for occlusion queries if GL is set to not use VBOs for stream draw.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-x | indra/newview/pipeline.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 221960ba0f..a8e36df294 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -383,6 +383,7 @@ void LLPipeline::init() sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO"); + LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw"); sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); @@ -5795,6 +5796,8 @@ void LLPipeline::resetVertexBuffers() sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO"); + LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw"); + LLVertexBuffer::sEnableVBOs = gSavedSettings.getBOOL("RenderVBOEnable"); sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight"); sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha"); @@ -5853,24 +5856,6 @@ void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture) gGLLastMatrix = NULL; } -void LLPipeline::setUseVBO(BOOL use_vbo) -{ - if (use_vbo != LLVertexBuffer::sEnableVBOs) - { - if (use_vbo) - { - llinfos << "Enabling VBO." << llendl; - } - else - { - llinfos << "Disabling VBO." << llendl; - } - - resetVertexBuffers(); - LLVertexBuffer::initClass(use_vbo); - } -} - void apply_cube_face_rotation(U32 face) { switch (face) |