X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fframebuffer.cpp;h=f402b64366e98e4d1cc44e56fb446d14a495d4bf;hb=67f22642d636861f90a016077c9387b7b8397414;hp=cf478ce29b686d842ce2074078952633b2e47b02;hpb=e65e7dabfc1d3b2c87345df75fc942fb1fe47581;p=libs%2Fgl.git diff --git a/source/framebuffer.cpp b/source/framebuffer.cpp index cf478ce2..f402b643 100644 --- a/source/framebuffer.cpp +++ b/source/framebuffer.cpp @@ -355,6 +355,9 @@ void Framebuffer::blit_from(const Framebuffer &other, BufferBits bits, bool filt void Framebuffer::bind() const { + if(attachments.empty()) + throw invalid_operation("Framebuffer::bind"); + if(set_current(this)) { glBindFramebuffer(GL_FRAMEBUFFER, id);