diff options
| author | Nicky <none@none> | 2012-09-01 15:24:54 +0200 | 
|---|---|---|
| committer | Nicky <none@none> | 2012-09-01 15:24:54 +0200 | 
| commit | 86e84ae75ef86417be32cff9a22a48fd7853758c (patch) | |
| tree | edfc722ad594af820cc71a1fb9ac59882b9e666f | |
| parent | 510e1b9e0ec14e98793041b9560694454a9aec2b (diff) | |
Crashfix; handle errors in release builds more gracefully.
| -rw-r--r-- | indra/llrender/llrendertarget.cpp | 15 | 
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;  | 
