|
Specific implementation of the render target class. More...
#include <SurgSim/Graphics/OsgRenderTarget.h>
Public Types | |
| typedef T | TextureType |
| The internal type of the texture, not exposed in the public interface. More... | |
Public Member Functions | |
| OsgRenderTarget () | |
| Default constructor. More... | |
| OsgRenderTarget (int width, int height, double scale=1.0, int colorCount=0, bool useDepth=false) | |
| Constructor set all the paramters for the render target. More... | |
| ~OsgRenderTarget () | |
| Destructor. More... | |
| void | getSize (int *width, int *height) const override |
| Gets a size. More... | |
| int | getColorTargetCount () const override |
| std::shared_ptr< Texture > | getColorTarget (int index) const override |
| Generic accessor for a specific color target texture. More... | |
| std::shared_ptr< OsgTexture > | getColorTargetOsg (int index) const |
| Accessor for the color target as an OsgTexture. More... | |
| bool | doesUseDepthTarget () const override |
| Determines if RenderTarget does use a depth target. More... | |
| std::shared_ptr< Texture > | getDepthTarget () const override |
| Generic accessor for the depth Target. More... | |
| std::shared_ptr< OsgTexture > | getDepthTargetOsg () const |
| Accessor for the depth target as an OsgTexture. More... | |
Public Member Functions inherited from SurgSim::Graphics::RenderTarget | |
| RenderTarget () | |
| Constructor. More... | |
| virtual | ~RenderTarget () |
Private Types | |
| enum | TargetTypes { TARGETTYPE_DEPTH = 0, TARGETTYPE_COLORBASE = 1 } |
| Values that represent TargetTypes. More... | |
Private Member Functions | |
| int | setColorTargetCount (int count) |
| Sets color target count. More... | |
| void | useDepthTarget (bool val) |
| Use depth target. More... | |
| void | setupTexture (int type) |
| Sets up the texture with a given target type (depth or color w/ index). More... | |
Private Attributes | |
| int | m_width |
| The width of this RenderTarget. More... | |
| int | m_height |
| The height of this RenderTarget. More... | |
| int | m_colorTargetCount |
| Number of color targets. More... | |
| std::vector< std::shared_ptr< TextureType > > | m_textures |
| The textures that are being used as target, size of this is 16 (ColorTargets) + 1 (Depth). More... | |
Specific implementation of the render target class.
It is templated so different texture formats can be chosen.
| T | Type of the texture that should be used as targets probably either OsgTexture2d or OsgTextureRectangle. |
| typedef T SurgSim::Graphics::OsgRenderTarget< T >::TextureType |
The internal type of the texture, not exposed in the public interface.
|
private |
| SurgSim::Graphics::OsgRenderTarget< T >::OsgRenderTarget | ( | ) |
Default constructor.
| SurgSim::Graphics::OsgRenderTarget< T >::OsgRenderTarget | ( | int | width, |
| int | height, | ||
| double | scale = 1.0, |
||
| int | colorCount = 0, |
||
| bool | useDepth = false |
||
| ) |
Constructor set all the paramters for the render target.
| width,height | The width and height of the target textures. |
| scale | (Optional) the scale, scales width and height by this factor. |
| colorCount | (Optional) number of color textures to use. |
| useDepth | (Optional) whether to use a depth texture. |
| SurgSim::Graphics::OsgRenderTarget< T >::~OsgRenderTarget | ( | ) |
Destructor.
|
overridevirtual |
Determines if RenderTarget does use a depth target.
Implements SurgSim::Graphics::RenderTarget.
|
overridevirtual |
Generic accessor for a specific color target texture.
| index | Zero-based index of the texure. |
Implements SurgSim::Graphics::RenderTarget.
|
overridevirtual |
Implements SurgSim::Graphics::RenderTarget.
|
virtual |
Accessor for the color target as an OsgTexture.
| index | Zero-based index of the color texture. |
Implements SurgSim::Graphics::OsgAbstractRenderTarget.
|
overridevirtual |
Generic accessor for the depth Target.
Implements SurgSim::Graphics::RenderTarget.
|
virtual |
Accessor for the depth target as an OsgTexture.
Implements SurgSim::Graphics::OsgAbstractRenderTarget.
|
overridevirtual |
Gets a size.
| [out] | width,height | The width and height of the RenderTarget textures. |
Implements SurgSim::Graphics::RenderTarget.
|
private |
Sets color target count.
| count | The number of color textures to use. |
|
private |
Sets up the texture with a given target type (depth or color w/ index).
| type | The index of the texture to use. |
|
private |
Use depth target.
| val | true to value. |
|
private |
Number of color targets.
|
private |
The height of this RenderTarget.
|
private |
The textures that are being used as target, size of this is 16 (ColorTargets) + 1 (Depth).
|
private |
The width of this RenderTarget.
1.8.13