Commit 09b309ed authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Added tgt::FramebufferObject::attachTexture() to check for completeness in...

Added tgt::FramebufferObject::attachTexture() to check for completeness in debug mode. This should catch and thereby ease debugging of misconfigurations of the FBO that will otherwise lead to errors at some later place.
parent a8b3ac27
...@@ -77,6 +77,10 @@ void FramebufferObject::attachTexture(Texture* texture, GLenum attachment, int m ...@@ -77,6 +77,10 @@ void FramebufferObject::attachTexture(Texture* texture, GLenum attachment, int m
attachments_[index] = texture; attachments_[index] = texture;
if (index < TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS) if (index < TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS)
++numColorAttachments_; ++numColorAttachments_;
#ifdef CAMPVIS_DEBUG
this->isComplete();
#endif
} }
Texture* FramebufferObject::getTextureAtAttachment(GLenum attachment) { Texture* FramebufferObject::getTextureAtAttachment(GLenum attachment) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment