X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frenderbuffer.h;fp=source%2Frenderbuffer.h;h=efcf5658872982f3aaf6f3ca97471c363a797ec5;hp=977f2453af950df7600e6823448eae6fdd6c0d59;hb=e003d7a1497dad3b13e4e88e681f8fa2afc40c83;hpb=2be605933f62521bb22780256386a14b371c8b17 diff --git a/source/renderbuffer.h b/source/renderbuffer.h index 977f2453..efcf5658 100644 --- a/source/renderbuffer.h +++ b/source/renderbuffer.h @@ -10,9 +10,11 @@ namespace GL { /** A Renderbuffer contains a single renderable image. It can be attached to a Framebuffer to provide a logical buffer that is required to render the scene -correctly but that is not needed as a texture later. +correctly but that is not needed as a texture later. Renderbuffers also +provide a capability for multisampling, which is not available in textures. -Requires the GL_EXT_framebuffer_object extension. +Requires the GL_EXT_framebuffer_object extension. Multisample renderbuffers +additionally require the GL_EXT_framebuffer_multisample extension. */ class Renderbuffer: public Bindable { @@ -29,8 +31,14 @@ public: unsigned get_width() const { return width; } unsigned get_height() const { return height; } - void storage(PixelFormat fmt, unsigned width, unsigned height); - void storage_multisample(unsigned, PixelFormat fmt, unsigned, unsigned); + /** Allocates storage for the renderbuffer. */ + void storage(PixelFormat fmt, unsigned wd, unsigned ht); + + /** Allocates multisample storage for the renderbuffer. All attachments in + a framebuffer must have the same number of samples. To transfer the + contents to a texture for furter processing, use the framebuffer blit + functions.*/ + void storage_multisample(unsigned samples, PixelFormat fmt, unsigned wd, unsigned ht); void bind() const;