summaryrefslogtreecommitdiff
path: root/indra/newview/llvowater.cpp
diff options
context:
space:
mode:
authorcallum_linden <callum@lindenlab.com>2017-12-11 10:09:44 -0800
committercallum_linden <callum@lindenlab.com>2017-12-11 10:09:44 -0800
commit5561673bf1c98c717f69e747a9e8b0d56129ef12 (patch)
treef021c5beca7aaad132c60d25881c7920a9944daf /indra/newview/llvowater.cpp
parentfe29551d9a6685bdc40e87ae135f236aec1ea475 (diff)
parentc565c62745ec37484118888f8f45dbde34d42e46 (diff)
Automated merge with tip of viewer64 *plus* update to CEF 3.3202.1686 / Dullahan 901
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);