X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fframebuffer.cpp;h=77ac21be6b0e6ef76da3928247b54b2c69074c5b;hb=c4cacaf8f9225e006e6bb35f81eb6c2f78602bdc;hp=8dbd2d0ee93bd20940b26326c1d2aaeb0c3f25a1;hpb=f9bc891fabac1479cb483284d31bdddba07c7945;p=libs%2Fgl.git diff --git a/source/framebuffer.cpp b/source/framebuffer.cpp index 8dbd2d0e..77ac21be 100644 --- a/source/framebuffer.cpp +++ b/source/framebuffer.cpp @@ -52,7 +52,7 @@ void Framebuffer::update_attachment(unsigned mask) const { if(current()==this) { - bool has_color = false; + GLenum color_buf = GL_NONE; bool has_depth = false; for(unsigned i=0; i=COLOR_ATTACHMENT0 && attch.attachment<=COLOR_ATTACHMENT3) - has_color = true; + color_buf = attch.attachment; if(attch.attachment==DEPTH_ATTACHMENT) has_depth = true; } - glDrawBuffer(has_color ? GL_FRONT : GL_NONE); + glDrawBuffer(color_buf); glDepthMask(has_depth); } else