summaryrefslogtreecommitdiff
path: root/indra/newview/llvosky.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2017-11-29 11:31:08 -0800
committerOz Linden <oz@lindenlab.com>2017-11-29 11:31:08 -0800
commita12e282cd473d5b7fc3e23fdd8fdfed11cc88864 (patch)
treecf07df2ae2219009bdc8337f4f9b4f1247fbd65d /indra/newview/llvosky.cpp
parent28f3b032076929bf595c34ab10666930c7ea1464 (diff)
parent1693ccba58eef676df1f91e50627545ac35bb819 (diff)
merge changes for 5.0.9-release
Diffstat (limited to 'indra/newview/llvosky.cpp')
-rw-r--r--indra/newview/llvosky.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 4dab213fa0..86b380087a 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1462,7 +1462,12 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons
{
facep->setSize(4, 6);
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
- buff->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE);
+ if (!buff->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer for vosky to "
+ << facep->getGeomCount() << " vertices and "
+ << facep->getIndicesCount() << " indices" << LL_ENDL;
+ }
facep->setGeomIndex(0);
facep->setIndicesIndex(0);
facep->setVertexBuffer(buff);
@@ -1869,7 +1874,12 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H,
{
face->setSize(quads * 4, quads * 6);
LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
- buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE);
+ if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer for vosky to "
+ << face->getGeomCount() << " vertices and "
+ << face->getIndicesCount() << " indices" << LL_ENDL;
+ }
face->setIndicesIndex(0);
face->setGeomIndex(0);
face->setVertexBuffer(buff);