viewport(0, 0, width, height);
}
+void Framebuffer::clear()
+{
+ clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT|STENCIL_BUFFER_BIT);
+}
+
void Framebuffer::clear(BufferBits bits)
{
BindRestore _bind(this);
void Framebuffer::bind() const
{
+ if(id && attachments.empty())
+ throw invalid_operation("Framebuffer::bind");
+
if(set_current(this))
{
glBindFramebuffer(GL_FRAMEBUFFER, id);