namespace Msp {
namespace GL {
-class Renderbuffer;
class Texture;
class Texture2D;
+class Texture2DMultisample;
class Texture3D;
class WindowView;
fullscreen shader effects.
A framebuffer consist of a number of logical buffers, such as color and depth
-buffers. Renderbuffers and Textures can be attached to the logical buffers. At
-least one image must be attached for the framebuffer to be usable.
+buffers. Textures can be attached to the logical buffers. At least one image
+must be attached for the framebuffer to be usable.
Requires the GL_EXT_framebuffer_object extension. The blit functions require
the GL_EXT_framebuffer_blit extension.
struct Attachment
{
FramebufferAttachment attachment;
- GLenum type;
- union
- {
- Renderbuffer *rbuf;
- Texture *tex;
- };
+ Texture *tex;
unsigned level;
int layer;
Attachment(FramebufferAttachment);
- void set(Renderbuffer &);
void set(Texture &, unsigned, int);
void clear();
};
void update() const;
void check_size();
unsigned get_attachment_index(FramebufferAttachment);
- void set_texture_attachment(FramebufferAttachment, Texture &, unsigned, int);
+ void set_attachment(FramebufferAttachment, Texture &, unsigned, int);
public:
- void attach(FramebufferAttachment attch, Renderbuffer &rbuf);
void attach(FramebufferAttachment attch, Texture2D &tex, unsigned level = 0);
+ void attach(FramebufferAttachment attch, Texture2DMultisample &tex);
void attach(FramebufferAttachment attch, Texture3D &tex, unsigned layer, unsigned level = 0);
void attach(FramebufferAttachment attch, TextureCube &tex, TextureCubeFace face, unsigned level = 0);
void attach_layered(FramebufferAttachment attch, Texture3D &tex, unsigned level = 0);