X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fframebuffer.cpp;h=77ac21be6b0e6ef76da3928247b54b2c69074c5b;hb=955e7cada42e099016879332e71863e46075d72b;hp=8dbd2d0ee93bd20940b26326c1d2aaeb0c3f25a1;hpb=3663bed18358a2399b2a8a8f7779d85e0ed81bd0;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