#define MSP_GL_FRAMEBUFFER_H_
#include <vector>
+#include "bindable.h"
#include "gl.h"
-#include "types.h"
namespace Msp {
namespace GL {
Requires the GL_EXT_framebuffer_object extension.
*/
-class Framebuffer
+class Framebuffer: public Bindable<Framebuffer>
{
private:
struct Attachment
Attachment &operator=(Texture &);
};
- uint id;
+ unsigned id;
std::vector<Attachment> attachments;
unsigned width;
unsigned height;
- static const Framebuffer *cur_fbo;
static int sys_viewport[4];
public:
*/
FramebufferStatus check_status() const;
- static const Framebuffer *current();
static void unbind();
private:
void maybe_bind() const;