summaryrefslogtreecommitdiff
path: root/indra/newview/llvowater.cpp
diff options
context:
space:
mode:
authorAnkur Ahlawat <anchor@lindenlab.com>2018-01-04 00:54:41 -0800
committerAnkur Ahlawat <anchor@lindenlab.com>2018-01-04 00:54:41 -0800
commitd4ce47b09122d1f76601ba402c2b9ad6bb504950 (patch)
tree2f9a4aca02618d53d31ac62625645f89fb30c52f /indra/newview/llvowater.cpp
parent93100236ae34eaa9cd3fa314e7e770339c13eba7 (diff)
parent1693ccba58eef676df1f91e50627545ac35bb819 (diff)
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/newview/llvowater.cpp')
-rw-r--r--indra/newview/llvowater.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 9ce16a1674..ccda92810e 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -155,14 +155,22 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
if (!buff || !buff->isWriteable())
{
buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB);
- buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE);
+ if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer on water update to "
+ << face->getGeomCount() << " vertices and "
+ << face->getIndicesCount() << " indices" << LL_ENDL;
+ }
face->setIndicesIndex(0);
face->setGeomIndex(0);
face->setVertexBuffer(buff);
}
else
{
- buff->resizeBuffer(face->getGeomCount(), face->getIndicesCount());
+ if (!buff->resizeBuffer(face->getGeomCount(), face->getIndicesCount()))
+ {
+ LL_WARNS() << "Failed to resize Vertex Buffer" << LL_ENDL;
+ }
}
index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp);