Renderbuffer Class Reference
[Advanced]

Offscreen render location that can be attached to a Framebuffer. More...

#include <Renderbuffer.hpp>

Inheritance diagram for Renderbuffer:
Attachment Attachable Node

List of all members.

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

Detailed Description

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>
 
Note:
Remember to use Clear if using a depth renderbuffer.
See also:
Framebuffer
Target
Clear

Constructor & Destructor Documentation

Renderbuffer ( const Tag tag  ) 

Initializes the type, format, and size of the renderbuffer.

Exceptions:
NodeException if type not recognized.
~Renderbuffer (  ) 

Deletes the underlying OpenGL renderbuffer object.


Member Function Documentation

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]
Returns:
Integer identifying the underlying OpenGL renderbuffer object.
string toString (  )  const [virtual]

Adds size to the node's description.

Reimplemented from Attachment.


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