Abstract base class for an item attached to the framebuffer. More...
#include <Attachment.hpp>
Public Member Functions | |
Attachment (const Tag &tag, const string &type) | |
virtual void | attach ()=0 |
Framebuffer * | getFramebuffer () const |
GLint | getIndex () const |
GLuint | getLocation () const |
virtual string | getName () const |
virtual void | setIndex (GLint index) |
virtual void | setLocation (GLuint location) |
virtual string | toString () const |
Static Public Member Functions | |
static Attachment * | find (Node *node, const string &name) |
Protected Member Functions | |
virtual void | associate () |
virtual void | setName (const string &name) |
virtual void | setType (const string &type) |
Private Attributes | |
Framebuffer * | framebuffer |
GLint | index |
GLuint | location |
string | name |
string | type |
Abstract base class for an item attached to the framebuffer.
Attachment | ( | const Tag & | tag, | |
const string & | type | |||
) |
Initializes the name of the attachment.
tag | XML tag with optional name attribute. | |
type | Either "color" or "depth" |
void associate | ( | ) | [protected, virtual] |
Finds the first framebuffer above this node and enqueue it.
NodeException | if framebuffer cannot be found. |
Reimplemented from Node.
Reimplemented in Renderbuffer, and Target.
Attachment * find | ( | Node * | node, | |
const string & | name | |||
) | [static] |
Framebuffer * getFramebuffer | ( | ) | const [inline] |
GLint getIndex | ( | ) | const [inline] |
GLuint getLocation | ( | ) | const [inline] |
string getName | ( | ) | const [inline, virtual] |
void setIndex | ( | GLint | index | ) | [inline, virtual] |
Sets the user-defined name of the attachment.
Implements Attachable.
void setLocation | ( | GLuint | loc | ) | [inline, virtual] |
Sets the location the attachment should be attached to.
Implements Attachable.
void setName | ( | const string & | name | ) | [inline, protected, virtual] |
Sets the user-defined name of the attachment.
void setType | ( | const string & | t | ) | [inline, protected, virtual] |
Sets the user-defined name of the attachment.
string toString | ( | ) | const [virtual] |
Reimplemented from Node.
Reimplemented in Renderbuffer, and Target.