#pragma once #include #include #include "renderbuffer.hpp" #include "texture.hpp" namespace moggle { inline fbo create_default_fbo(GLsizei width, GLsizei height){ fbo f; f.attach(GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, create_texture(width, height, GL_RGBA32F)); f.attach(GL_DEPTH_ATTACHMENT, create_renderbuffer(width, height, 1, GL_DEPTH_COMPONENT16)); f.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); return f; } }