summaryrefslogtreecommitdiff
path: root/indra/newview/llvowlsky.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/llvowlsky.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/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 16130b5ca7..3b9b96e9f1 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -313,7 +313,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)
@@ -375,7 +380,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)
@@ -777,7 +787,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)