# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::RenderTarget Class Reference

The RenderTarget class defines an abstract 'surface' where OpenGL can render into. More...

`#include <RenderTarget.hpp>`

Inheritance diagram for vl::RenderTarget:

List of all members.

## Public Member Functions

OpenGLContext * | openglContext ()
const OpenGLContext * | openglContext () const
int | width () const
int | height () const
void | setWidth (int width)
void | setHeight (int height)
void | activate ()
| Activates the RenderTarget by calling bindFramebuffer() and setDrawBuffers().
virtual void | bindFramebuffer ()
void | bindDrawBuffers () const
void | checkDrawBuffers () const
void | setDrawBuffers (EReadDrawBuffer render_buffer)
void | setDrawBuffers (EReadDrawBuffer render_buffer1, EReadDrawBuffer render_buffer2)
void | setDrawBuffers (EReadDrawBuffer render_buffer1, EReadDrawBuffer render_buffer2, EReadDrawBuffer render_buffer3)
void | setDrawBuffers (EReadDrawBuffer render_buffer1, EReadDrawBuffer render_buffer2, EReadDrawBuffer render_buffer3, EReadDrawBuffer render_buffer4)
void | setDrawBuffers (const std::vector< EReadDrawBuffer > &render_buffers)
const std::vector < EReadDrawBuffer > & | renderBuffers ()

## Protected Member Functions

virtual const char * | className ()
| Returns the name of the class.
| RenderTarget (OpenGLContext *ctx, int w, int h)

## Protected Attributes

int | mWidth
int | mHeight
std::vector< EReadDrawBuffer > | mDrawBuffers
OpenGLContext * | mOpenGLContext

## Friends

class | OpenGLContext

## Detailed Description

The RenderTarget class defines an abstract 'surface' where OpenGL can render into.

See also:
  OpenGLContext::renderTarget() and FBORenderTarget

## Constructor & Destructor Documentation

vl::RenderTarget::RenderTarget | ( | OpenGLContext * | ctx,
|  | int | w,
|  | int | h |
| ) |  |  | `[inline, protected]`

## Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::Object.

Reimplemented in vl::FBORenderTarget.

OpenGLContext* vl::RenderTarget::openglContext | ( |  | ) | `[inline]`

const OpenGLContext* vl::RenderTarget::openglContext | ( |  | ) | const`[inline]`

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

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

void vl::RenderTarget::setWidth | ( | int | width | ) | `[inline]`

void vl::RenderTarget::setHeight | ( | int | height | ) | `[inline]`

void vl::RenderTarget::activate | ( |  | ) | `[inline]`

Activates the RenderTarget by calling bindFramebuffer() and setDrawBuffers().

virtual void vl::RenderTarget::bindFramebuffer | ( |  | ) | `[inline, virtual]`

Reimplemented in vl::FBORenderTarget.

void RenderTarget::bindDrawBuffers | ( |  | ) | const

void RenderTarget::checkDrawBuffers | ( |  | ) | const

void vl::RenderTarget::setDrawBuffers | ( | EReadDrawBuffer | render_buffer | ) | `[inline]`

void vl::RenderTarget::setDrawBuffers | ( | EReadDrawBuffer | render_buffer1,
|  | EReadDrawBuffer | render_buffer2 |
| ) |  |  | `[inline]`

void vl::RenderTarget::setDrawBuffers | ( | EReadDrawBuffer | render_buffer1,
|  | EReadDrawBuffer | render_buffer2,
|  | EReadDrawBuffer | render_buffer3 |
| ) |  |  | `[inline]`

void vl::RenderTarget::setDrawBuffers | ( | EReadDrawBuffer | render_buffer1,
|  | EReadDrawBuffer | render_buffer2,
|  | EReadDrawBuffer | render_buffer3,
|  | EReadDrawBuffer | render_buffer4 |
| ) |  |  | `[inline]`

void vl::RenderTarget::setDrawBuffers | ( | const std::vector< EReadDrawBuffer > & | render_buffers | ) | `[inline]`

const std::vector< EReadDrawBuffer >& vl::RenderTarget::renderBuffers | ( |  | ) | `[inline]`

## Friends And Related Function Documentation

friend class OpenGLContext`[friend]`

Reimplemented in vl::FBORenderTarget.

## Member Data Documentation

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

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

std::vector< EReadDrawBuffer > vl::RenderTarget::mDrawBuffers`[protected]`

OpenGLContext* vl::RenderTarget::mOpenGLContext`[protected]`

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

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

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:39 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.