]> git.tdb.fi Git - libs/gl.git/blobdiff - source/framebuffer.cpp
Recognize an assignment to an out parameter as used
[libs/gl.git] / source / framebuffer.cpp
index cf478ce29b686d842ce2074078952633b2e47b02..659b14e7d819c9db635fb2e3469c9403fd0affc6 100644 (file)
@@ -355,6 +355,9 @@ void Framebuffer::blit_from(const Framebuffer &other, BufferBits bits, bool filt
 
 void Framebuffer::bind() const
 {
+       if(id && attachments.empty())
+               throw invalid_operation("Framebuffer::bind");
+
        if(set_current(this))
        {
                glBindFramebuffer(GL_FRAMEBUFFER, id);