diff options
author | callum_linden <callum@lindenlab.com> | 2017-11-30 14:44:44 -0800 |
---|---|---|
committer | callum_linden <callum@lindenlab.com> | 2017-11-30 14:44:44 -0800 |
commit | dd0d2805e2b495246525f49325c4492b7b57f157 (patch) | |
tree | 96ae78468bbe760c4934416764a4cd89cf5ae381 /indra/newview/llvowater.cpp | |
parent | 2e3c5ac88a434ee437bc3e68b321d5bd0bcd7cc9 (diff) | |
parent | e3a2c5e3217ae74a0277f2e6d4e1e708fe398a1c (diff) |
Automated erge with tip of viewer64
Diffstat (limited to 'indra/newview/llvowater.cpp')
-rw-r--r-- | indra/newview/llvowater.cpp | 12 |
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); |