summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNicky <none@none>2012-09-01 15:24:54 +0200
committerNicky <none@none>2012-09-01 15:24:54 +0200
commit86e84ae75ef86417be32cff9a22a48fd7853758c (patch)
treeedfc722ad594af820cc71a1fb9ac59882b9e666f /indra
parent510e1b9e0ec14e98793041b9560694454a9aec2b (diff)
Crashfix; handle errors in release builds more gracefully.
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llrendertarget.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index cc5c232380..846311a8d0 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -163,10 +163,19 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
}
U32 offset = mTex.size();
- if (offset >= 4 ||
- (offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers)))
+
+ if( offset >= 4 )
{
- llerrs << "Too many color attachments!" << llendl;
+ llwarns << "Too many color attachments" << llendl;
+ llassert( offset < 4 );
+ return false;
+ }
+ if( offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers) )
+ {
+ llwarns << "FBO not used or no drawbuffers available; mFBO=" << (U32)mFBO << " gGLManager.mHasDrawBuffers=" << (U32)gGLManager.mHasDrawBuffers << llendl;
+ llassert( mFBO != 0 );
+ llassert( gGLManager.mHasDrawBuffers );
+ return false;
}
U32 tex;