Offscreen render location that can be attached to a Framebuffer. More...
#include <Renderbuffer.hpp>
Public Member Functions | |
| Renderbuffer (const Tag &tag) | |
| ~Renderbuffer () | |
| virtual void | associate () |
| virtual void | attach () |
| virtual GLuint | getHandle () const |
| virtual string | toString () const |
Private Attributes | |
| GLenum | format |
| GLuint | handle |
| int | size |
Offscreen render location that can be attached to a Framebuffer.
Convenient if the Framebuffer object needs a depth buffer, or if the user needs to render to an offscreen location but does not want to use that data as a texture. (In that case use Target.)
It should be possible to use glReadPixels with the renderbuffer. Use getHandle() to retrieve the underlying OpenGL renderbuffer object.
XML Name
XML Attributes
| type | color or depth |
| size | Width and height of the renderbuffer storage. |
OpenGL Functions
Example
<framebuffer>
<renderbuffer type="depth" size="512" />
<clear />
</framebuffer>
| Renderbuffer | ( | const Tag & | tag | ) |
Initializes the type, format, and size of the renderbuffer.
| NodeException | if type not recognized. |
| ~Renderbuffer | ( | ) |
Deletes the underlying OpenGL renderbuffer object.
| void associate | ( | ) | [virtual] |
Creates an underlying OpenGL renderbuffer object.
Reimplemented from Attachment.
| void attach | ( | ) | [virtual] |
Creates storage for the renderbuffer and attaches it to the framebuffer.
Implements Attachment.
| GLuint getHandle | ( | ) | const [inline, virtual] |
| string toString | ( | ) | const [virtual] |
Adds size to the node's description.
Reimplemented from Attachment.
1.6.3