summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-11-13 11:57:14 -0500
committerOz Linden <oz@lindenlab.com>2012-11-13 11:57:14 -0500
commitbe210914f4e9081f021cc1ad3b671765aba79b61 (patch)
tree006e4ec827b8c1b3cf6042c08e12aadf48f43943 /indra/llrender/llrendertarget.cpp
parent7e779a29c142feaa34a30dff39b72d0ae7c0fdc3 (diff)
parentd8f081cf1b18ddb5f0412b21f4d36bfce6abae19 (diff)
merge changes for DRTVWR-238
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-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;