summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-11-16 17:11:48 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-11-16 17:11:48 +0200
commit5a402dbc1f90d3a6fa6a4581cdd7bcf8f0484b8e (patch)
tree920ddb473459d76abb8532e63ae0d3672fc4eb4e
parent02e418a5cdb109ea626ad7677ff223e464cc220a (diff)
MAINT-7228 Vertex buffer allocation failure handling
-rw-r--r--indra/llrender/llvertexbuffer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 6de2a973d2..0b4427a31a 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1356,10 +1356,10 @@ bool LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
sucsess &= updateNumVerts(nverts);
sucsess &= updateNumIndices(nindices);
- if (sucsess && create && (nverts || nindices))
+ if (create && (nverts || nindices))
{
//actually allocate space for the vertex buffer if using VBO mapping
- flush();
+ flush(); //unmap
if (gGLManager.mHasVertexArrayObject && useVBOs() && sUseVAO)
{
@@ -1502,9 +1502,9 @@ bool LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
sucsess &= updateNumVerts(newnverts);
sucsess &= updateNumIndices(newnindices);
- if (sucsess && useVBOs())
+ if (useVBOs())
{
- flush();
+ flush(); //unmap
if (mGLArray)
{ //if size changed, offsets changed