Skip to content
Snippets Groups Projects
Commit 86e84ae7 authored by Nicky's avatar Nicky
Browse files

Crashfix; handle errors in release builds more gracefully.

parent 510e1b9e
No related branches found
No related tags found
No related merge requests found
...@@ -163,10 +163,19 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) ...@@ -163,10 +163,19 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
} }
U32 offset = mTex.size(); 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; U32 tex;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment