void Framebuffer::bind() const
{
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, id);
- current=this;
+ cur_fbo=this;
}
void Framebuffer::attach(FramebufferAttachment attch, Renderbuffer &rbuf)
return static_cast<FramebufferStatus>(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT));
}
+const Framebuffer *Framebuffer::current()
+{
+ return cur_fbo;
+}
+
void Framebuffer::unbind()
{
- if(current)
+ if(cur_fbo)
{
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- current=0;
+ cur_fbo=0;
}
}
void Framebuffer::maybe_bind() const
{
- if(current!=this)
+ if(cur_fbo!=this)
bind();
}
-const Framebuffer *Framebuffer::current=0;
+const Framebuffer *Framebuffer::cur_fbo=0;
} // namespace GL
} // namespace Msp