All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
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:
Inheritance graph
[legend]

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< TexturegetColorTarget (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< TexturegetDepthTarget () 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

SurgSim::Graphics::RenderTarget::RenderTarget ( )
inline

Constructor.

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

Member Function Documentation

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 >.

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
indexZero-based index of the texture to be used.
Returns
The color target, nullptr if index exceeds getColorTargetCount().

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

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 >.

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 >.

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

Gets a size.

Parameters
[out]width,heightThe width and height of the RenderTarget textures.

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


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