X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fframebuffer.cpp;h=659b14e7d819c9db635fb2e3469c9403fd0affc6;hb=c1e297b01f07be122e9909a1ae9c04f0c51dfc21;hp=237f417a9b45db982ffe54e8a59e0bf9a8895e8f;hpb=e19309340e90ee881e9cb2f8b7c33a5b89681aa6;p=libs%2Fgl.git diff --git a/source/framebuffer.cpp b/source/framebuffer.cpp index 237f417a..659b14e7 100644 --- a/source/framebuffer.cpp +++ b/source/framebuffer.cpp @@ -39,6 +39,15 @@ void operator<<(LexicalConverter &conv, FramebufferStatus status) case FRAMEBUFFER_INCOMPLETE_READ_BUFFER: conv.result("missing read buffer attachment"); break; + case FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: + conv.result("mismatched attachment sample counts"); + break; + case FRAMEBUFFER_INCOMPLETE_LAYER_COUNT: + conv.result("mismatched attachment layer counts"); + break; + case FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS: + conv.result("mismatched attachment layering"); + break; case FRAMEBUFFER_UNSUPPORTED: conv.result("unsupported"); break; @@ -346,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);