X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fframebuffer.cpp;h=659b14e7d819c9db635fb2e3469c9403fd0affc6;hb=80a0f481687ea17cc9a3b6557b480adf5802ca4a;hp=cf478ce29b686d842ce2074078952633b2e47b02;hpb=0e130c02d5e89397ac4963676534e0005359c61e;p=libs%2Fgl.git diff --git a/source/framebuffer.cpp b/source/framebuffer.cpp index cf478ce2..659b14e7 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(id && attachments.empty()) + throw invalid_operation("Framebuffer::bind"); + if(set_current(this)) { glBindFramebuffer(GL_FRAMEBUFFER, id);