# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::FBORenderbufferAttachment Class Reference

Abstract class that represents a framebuffer renderbuffer attachment, i.e. More...

`#include <FramebufferObject.hpp>`

Inheritance diagram for vl::FBORenderbufferAttachment:

List of all members.

## Public Member Functions
| FBORenderbufferAttachment ()
virtual const char * | className ()
| Returns the name of the class.
void | create ()
| Creates a renderbuffer object calling glGenRenderbuffers().
void | destroy ()
| Deletes the renderbuffer object created with the create() function.
unsigned int | handle () const
| Returns the handle obtained by create() using glGenRenderbuffers().
void | initStorage (int w, int h)
| Initializes the storage of the renderbuffer with the given dimensions.
void | initStorage ()
| The same as calling initStorage(width(), height());.
int | width () const
| Returns the with of the allocated renderbuffer storage.
int | height () const
| Returns the with of the allocated renderbuffer storage.
int | samples () const
| Returns the number of samples to be used when allocating the renderbuffer's storage.
void | setWidth (int w)
| Defines the width to be specified when allocating the renderbuffer storage.
void | setHeight (int h)
| Defines the height to be specified when allocating the renderbuffer storage.
void | setSamples (int samples)
| Sets the number of samples to be specified when allocating the renderbuffer's storage. Note that this function schedules a reallocation of the renderbuffer storage.
bool | renderbufferStorageReady () const
| Returns false if the renderbuffer storage needs to be created or reallocated due to a change of the sample count or renderbuffer type.
## Protected Member Functions
virtual int | internalType ()=0
void | internalBindAttachment (int w, int h, int attach_point)
## Protected Attributes
unsigned int | mHandle
int | mWidth
int | mHeight
int | mSamples
bool | mReallocateRenderbuffer
## Friends
class | FBORenderTarget

## Detailed Description

Abstract class that represents a framebuffer renderbuffer attachment, i.e.

a non texture fbo attachment.

## Constructor & Destructor Documentation

vl::FBORenderbufferAttachment::FBORenderbufferAttachment | ( |  | ) | `[inline]`

## Member Function Documentation

virtual const char* vl::FBORenderbufferAttachment::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::FBOAttachmentAbstract.

Reimplemented in vl::FBOColorBufferAttachment, vl::FBODepthBufferAttachment, vl::FBOStencilBufferAttachment, and vl::FBODepthStencilBufferAttachment.

void FBORenderbufferAttachment::create | ( |  | ) |

Creates a renderbuffer object calling glGenRenderbuffers().

The identifier returned by glGenRenderbuffers() can be queried calling the handle() method.

void FBORenderbufferAttachment::destroy | ( |  | ) | `[virtual]`

Deletes the renderbuffer object created with the create() function.

Reimplemented from vl::FBOAttachmentAbstract.

unsigned int vl::FBORenderbufferAttachment::handle | ( |  | ) | const`[inline]`

Returns the handle obtained by create() using glGenRenderbuffers().

void FBORenderbufferAttachment::initStorage | ( | int | w,
|  | int | h |
| ) |  |  |

Initializes the storage of the renderbuffer with the given dimensions.

Note that the renderbuffer storage type is defined by the setType() method of FBOColorBufferAttachment, FBODepthBufferAttachment, FBOStencilBufferAttachment, FBODepthStencilBufferAttachment. See also setSamples().

void vl::FBORenderbufferAttachment::initStorage | ( |  | ) | `[inline]`

The same as calling initStorage(width(), height());.

int vl::FBORenderbufferAttachment::width | ( |  | ) | const`[inline]`

Returns the with of the allocated renderbuffer storage.

int vl::FBORenderbufferAttachment::height | ( |  | ) | const`[inline]`

Returns the with of the allocated renderbuffer storage.

int vl::FBORenderbufferAttachment::samples | ( |  | ) | const`[inline]`

Returns the number of samples to be used when allocating the renderbuffer's storage.

void vl::FBORenderbufferAttachment::setWidth | ( | int | w | ) | `[inline]`

Defines the width to be specified when allocating the renderbuffer storage.

Note that this function schedules a reallocation of the renderbuffer storage. If 'w' is set to 0 the renderbuffer storage allocation will use the default dimensions specified by the FBORenderTarget.

void vl::FBORenderbufferAttachment::setHeight | ( | int | h | ) | `[inline]`

Defines the height to be specified when allocating the renderbuffer storage.

Note that this function schedules a reallocation of the renderbuffer storage. If 'h' is set to 0 the renderbuffer storage allocation will use the default dimensions specified by the FBORenderTarget.

void vl::FBORenderbufferAttachment::setSamples | ( | int | samples | ) | `[inline]`

Sets the number of samples to be specified when allocating the renderbuffer's storage. Note that this function schedules a reallocation of the renderbuffer storage.

bool vl::FBORenderbufferAttachment::renderbufferStorageReady | ( |  | ) | const`[inline]`

Returns false if the renderbuffer storage needs to be created or reallocated due to a change of the sample count or renderbuffer type.

virtual int vl::FBORenderbufferAttachment::internalType | ( |  | ) | `[protected, pure virtual]`

Implemented in vl::FBOColorBufferAttachment, vl::FBODepthBufferAttachment, vl::FBOStencilBufferAttachment, and vl::FBODepthStencilBufferAttachment.

void FBORenderbufferAttachment::internalBindAttachment | ( | int | w,
|  | int | h,
|  | int | attach_point |
| ) |  |  | `[protected]`

## Friends And Related Function Documentation

friend class FBORenderTarget`[friend]`

Reimplemented from vl::FBOAttachmentAbstract.

## Member Data Documentation

unsigned int vl::FBORenderbufferAttachment::mHandle`[protected]`

int vl::FBORenderbufferAttachment::mWidth`[protected]`

int vl::FBORenderbufferAttachment::mHeight`[protected]`

int vl::FBORenderbufferAttachment::mSamples`[protected]`

bool vl::FBORenderbufferAttachment::mReallocateRenderbuffer`[protected]`

The documentation for this class was generated from the following files:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/FramebufferObject.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/FramebufferObject.cpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:28:57 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.