]> git.tdb.fi Git - libs/gl.git/commitdiff
Allow system framebuffer to not have attachments
authorMikko Rasa <tdb@tdb.fi>
Mon, 4 Nov 2019 01:55:41 +0000 (03:55 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 4 Nov 2019 01:55:41 +0000 (03:55 +0200)
source/framebuffer.cpp

index f402b64366e98e4d1cc44e56fb446d14a495d4bf..659b14e7d819c9db635fb2e3469c9403fd0affc6 100644 (file)
@@ -355,7 +355,7 @@ void Framebuffer::blit_from(const Framebuffer &other, BufferBits bits, bool filt
 
 void Framebuffer::bind() const
 {
-       if(attachments.empty())
+       if(id && attachments.empty())
                throw invalid_operation("Framebuffer::bind");
 
        if(set_current(this))