Maintains a framebuffer object that supports up to 8 color components simultaneously.
More...
|
| Framebuffer (unsigned int width, unsigned int height, Texture< 2 > &renderTexture) |
| Acquires framebuffer object with depth buffer and attaches renderTexture as the first color attachment. The renderTexture is resized automatically s.t. it matches the size of the framebuffer.
|
|
| ~Framebuffer () |
| Deletes the maintained framebuffer object and its depth buffer.
|
|
bool | hasRenderTexture (unsigned int location) const |
| Tells whether a color component exists at location.
|
|
const Texture< 2 > & | renderTexture (unsigned int location) const |
| References the render texture at location. More...
|
|
void | resize (const math::Vector2ui &size) |
| Resizes depth buffer and color components to size.
|
|
void | resize (unsigned int width, unsigned int height) |
|
unsigned int | width () const |
| Returns the framebuffer's width.
|
|
unsigned int | height () const |
| Returns the framebuffer's height.
|
|
|
static Texture< 2 > * | createRenderTexture (bool floatingPoint=false) |
| Creates render texture. More...
|
|
static void | copyDepthAttachment (unsigned int srcId, unsigned int dstId, const Viewport &src, const Viewport &dst) |
| Copies data from the depth attachment of the framebuffer identified by srcId to the depth attachment of the framebuffer identified by dstId. Use 0 for one of these arguments to reference the main framebuffer.
|
|
static void | copyColorAttachment (unsigned int srcId, unsigned int dstId, const Viewport &src, const Viewport &dst, unsigned int srcColorAttachment, unsigned int dstColorAttachment) |
| Copies data from the color attachment srcColorAttachment of the framebuffer identified by srcId to the color attachment dstColorAttachment of the framebuffer identified by dstId. Use 0 for one of these arguments to reference the main framebuffer.
|
|
static unsigned int | currentId () |
| Tells the ID of the currently bound framebuffer. This is 0 for the main framebuffer.
|
|
Maintains a framebuffer object that supports up to 8 color components simultaneously.
An OpenGL framebuffer object typically consists of a depth attachment and an ordered set of color attachments. The depth attachment can be realized either by a depth buffer (faster, read-only) or by a depth texture. Color attachments are always textures. We call them render textures here.
- Author
- Leonid Kostrykin
- Date
- 9.3.2011 - 25.3.15
Definition at line 49 of file Framebuffer.h.