I borked up the sUseStreamDraw logic earlier. When its a stream type, and sUseStreamDraw is false, don't use a vbo at all (I mistakenly had it use a dynamic vbo instead). Also, removed an unused (due to being renamed) setting from settings.xml

This commit is contained in:
Shyotl
2012-01-31 02:54:42 -06:00
parent eaecc9a4d0
commit d15ed9ed34
2 changed files with 4 additions and 16 deletions

View File

@@ -753,16 +753,15 @@ S32 LLVertexBuffer::determineUsage(S32 usage)
if (LLRender::sGLCoreProfile)
{ //MUST use VBOs for all rendering
if(!usage)
usage = GL_STREAM_DRAW_ARB;
return GL_STREAM_DRAW_ARB;
}
else if (!sEnableVBOs || !usage)
else if (!sEnableVBOs || !usage || (!sUseStreamDraw && usage == GL_STREAM_DRAW_ARB))
{
return 0;
}
//Only stream_draw and dynamic_draw are supported when using VBOs, dynamic draw is the default.
//Always use stream_draw VBO if mapping is disabled, or stream is enabled and preferred/expected
if( sDisableVBOMapping || (sUseStreamDraw && (sPreferStreamDraw || usage == GL_STREAM_DRAW_ARB)))
//Always use stream_draw VBO if mapping is disabled, or stream is preferred or expected
if( sDisableVBOMapping || sPreferStreamDraw || (usage == GL_STREAM_DRAW_ARB))
{
return GL_STREAM_DRAW_ARB;
}