X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fframebuffer.h;h=9fe59bf774b929474869cb2f5ba60b3970ba6804;hp=275f516e8d4d3b22acca3393a48065cb5d5422fb;hb=cd5f37b066352119cf92d53d0001af7ff99be437;hpb=715672cf2c64dab0744db676fdee255ee3a4cef7 diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index 275f516e..9fe59bf7 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -12,9 +12,9 @@ namespace Msp { namespace GL { -class Renderbuffer; class Texture; class Texture2D; +class Texture2DMultisample; class Texture3D; class WindowView; @@ -63,8 +63,8 @@ common application is rendering to a texture, which can then be used for 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. @@ -75,17 +75,11 @@ private: 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(); }; @@ -109,10 +103,10 @@ private: 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);