Apparently Nvidia drivers are too lax with this, but some others don't
like if the FBO has no color attachments and the read buffer is left at
its default setting of COLOR_ATTACHMENT0.
}
if(color_bufs.empty())
+ {
glDrawBuffer(GL_NONE);
+ glReadBuffer(GL_NONE);
+ }
else if(color_bufs.size()==1)
+ {
glDrawBuffer(color_bufs.front());
+ glReadBuffer(color_bufs.front());
+ }
else
{
static Require _req(ARB_draw_buffers);
glDrawBuffers(color_bufs.size(), &color_bufs[0]);
+ glReadBuffer(color_bufs.front());
}
}
else