summaryrefslogtreecommitdiff
path: root/indra/newview/llvowlsky.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2017-11-30 11:42:49 -0800
committerRider Linden <rider@lindenlab.com>2017-11-30 11:42:49 -0800
commit1df10afa2a7802763330475e1a90547c3cff7c06 (patch)
tree8a8cdb8c02f1e18e8cfacefc1efbc2ab43c6157e /indra/newview/llvowlsky.cpp
parentd7dd10b88bc3fda88f6528ecc5936e4889f019f3 (diff)
parente3a2c5e3217ae74a0277f2e6d4e1e708fe398a1c (diff)
Merge
Diffstat (limited to 'indra/newview/llvowlsky.cpp')
-rw-r--r--indra/newview/llvowlsky.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index aff155637e..0062eb5edd 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -314,7 +314,12 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
#if DOME_SLICES
{
mFanVerts = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
- mFanVerts->allocateBuffer(getFanNumVerts(), getFanNumIndices(), TRUE);
+ if (!mFanVerts->allocateBuffer(getFanNumVerts(), getFanNumIndices(), TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer on sky update to "
+ << getFanNumVerts() << " vertices and "
+ << getFanNumIndices() << " indices" << LL_ENDL;
+ }
BOOL success = mFanVerts->getVertexStrider(vertices)
&& mFanVerts->getTexCoord0Strider(texCoords)
@@ -376,7 +381,12 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
const U32 num_indices_this_seg = 1+num_stacks_this_seg*(2+2*verts_per_stack);
llassert(num_indices_this_seg * sizeof(U16) <= max_buffer_bytes);
- segment->allocateBuffer(num_verts_this_seg, num_indices_this_seg, TRUE);
+ if (!segment->allocateBuffer(num_verts_this_seg, num_indices_this_seg, TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer on update to "
+ << num_verts_this_seg << " vertices and "
+ << num_indices_this_seg << " indices" << LL_ENDL;
+ }
// lock the buffer
BOOL success = segment->getVertexStrider(vertices)
@@ -778,7 +788,10 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
if (mStarsVerts.isNull() || !mStarsVerts->isWriteable())
{
mStarsVerts = new LLVertexBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK, GL_DYNAMIC_DRAW);
- mStarsVerts->allocateBuffer(getStarsNumVerts()*6, 0, TRUE);
+ if (!mStarsVerts->allocateBuffer(getStarsNumVerts()*6, 0, TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer for Sky to " << getStarsNumVerts() * 6 << " vertices" << LL_ENDL;
+ }
}
BOOL success = mStarsVerts->getVertexStrider(verticesp)