SurgSim::Graphics::RenderTarget Class Referenceabstract

RenderTarget is an abstraction of the target buffers that a Camera should use to render it's scene valid targets are a given number of color buffers, and an optional depth buffer. More...

`#include <SurgSim/Graphics/RenderTarget.h>`

Inheritance diagram for SurgSim::Graphics::RenderTarget:

## Public Member Functions

| RenderTarget ()
| Constructor. More...
virtual | ~RenderTarget ()
virtual void | getSize (int *width, int *height) const =0
| Gets a size. More...
virtual int | getColorTargetCount () const =0
| Returns the number of textures that this RenderTarget uses to draw into. More...
virtual std::shared_ptr< Texture > | getColorTarget (int index) const =0
| Gets the indicated texture that is used as a target. More...
virtual bool | doesUseDepthTarget () const =0
| Check wether this draws into a depth texture. More...
virtual std::shared_ptr< Texture > | getDepthTarget () const =0
| Returns the texture that is used for the depth map drawing. More...

## Detailed Description

RenderTarget is an abstraction of the target buffers that a Camera should use to render it's scene valid targets are a given number of color buffers, and an optional depth buffer.

The buffers need to be made available as textures so they can be reused in another rendering step. The type of texture is not determined at this point and will depend on the concrete RenderTarget that is instantiated. The RenderTarget is consider immutable after construction.

## Constructor & Destructor Documentation

## RenderTarget()

SurgSim::Graphics::RenderTarget::RenderTarget | ( |  | ) |

inline

Constructor.

## ~RenderTarget()

virtual SurgSim::Graphics::RenderTarget::~RenderTarget | ( |  | ) |

inline virtual

## Member Function Documentation

## doesUseDepthTarget()

virtual bool SurgSim::Graphics::RenderTarget::doesUseDepthTarget | ( |  | ) | const

pure virtual

Check wether this draws into a depth texture.

Returns
  true if yes, otherwise false.

Implemented in SurgSim::Graphics::OsgRenderTarget< T >.

## getColorTarget()

virtual std::shared_ptr<Texture> SurgSim::Graphics::RenderTarget::getColorTarget | ( | int | index | ) | const

pure virtual

Gets the indicated texture that is used as a target.

Parameters

  index | Zero-based index of the texture to be used.

Returns
  The color target, nullptr if index exceeds getColorTargetCount().

Implemented in SurgSim::Graphics::OsgRenderTarget< T >.

## getColorTargetCount()

virtual int SurgSim::Graphics::RenderTarget::getColorTargetCount | ( |  | ) | const

pure virtual

Returns the number of textures that this RenderTarget uses to draw into.

Returns
  The color target count.

Implemented in SurgSim::Graphics::OsgRenderTarget< T >.

## getDepthTarget()

virtual std::shared_ptr<Texture> SurgSim::Graphics::RenderTarget::getDepthTarget | ( |  | ) | const

pure virtual

Returns the texture that is used for the depth map drawing.

Returns
  The depth target.

Implemented in SurgSim::Graphics::OsgRenderTarget< T >.

## getSize()

virtual void SurgSim::Graphics::RenderTarget::getSize | ( | int * | width,
|  | int * | height
| ) |  | const

pure virtual

Gets a size.

Parameters

  [out] | width,height | The width and height of the RenderTarget textures.

Implemented in SurgSim::Graphics::OsgRenderTarget< T >.

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

- SurgSim/Graphics/RenderTarget.h