Attachment Class Reference
[Advanced]

Abstract base class for an item attached to the framebuffer. More...

#include <Attachment.hpp>

Inheritance diagram for Attachment:
Attachable Node Renderbuffer Target

List of all members.

Public Member Functions

 Attachment (const Tag &tag, const string &type)
virtual void attach ()=0
FramebuffergetFramebuffer () 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 Attachmentfind (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

Framebufferframebuffer
GLint index
GLuint location
string name
string type

Detailed Description

Abstract base class for an item attached to the framebuffer.


Constructor & Destructor Documentation

Attachment ( const Tag tag,
const string &  type 
)

Initializes the name of the attachment.

Parameters:
tag XML tag with optional name attribute.
type Either "color" or "depth"

Member Function Documentation

void associate (  )  [protected, virtual]

Finds the first framebuffer above this node and enqueue it.

Exceptions:
NodeException if framebuffer cannot be found.

Reimplemented from Node.

Reimplemented in Renderbuffer, and Target.

Attachment * find ( Node node,
const string &  name 
) [static]
Returns:
first attachment above another node with the correct name.
Framebuffer * getFramebuffer (  )  const [inline]
Returns:
Framebuffer item attaches to.
GLint getIndex (  )  const [inline]
Returns:
Index in the framebuffer item attached to.
GLuint getLocation (  )  const [inline]
Returns:
Location in the framebuffer item attached to.
string getName (  )  const [inline, virtual]
Returns:
User-defined name identify the attachment.
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]
Returns:
string comprised of the object's name and attributes.

Reimplemented from Node.

Reimplemented in Renderbuffer, and Target.


The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:35 2010 for Gander by  doxygen 1.6.3