Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_OSGRENDERTARGET_H
17 #define SURGSIM_GRAPHICS_OSGRENDERTARGET_H
20 #include <unordered_map>
27 #include <osg/FrameBufferObject>
68 int colorCount = 0,
bool useDepth =
false);
74 void getSize(
int* width,
int* height)
const override;
void setupTexture(int type)
Sets up the texture with a given target type (depth or color w/ index).
Definition: OsgRenderTarget-inl.h:148
T TextureType
The internal type of the texture, not exposed in the public interface.
Definition: OsgRenderTarget.h:57
int m_width
The width of this RenderTarget.
Definition: OsgRenderTarget.h:110
Definition: OsgRenderTarget.h:105
OsgRenderTarget< OsgTexture2d > OsgRenderTarget2d
Definition: OsgRenderTarget.h:137
RenderTarget is an abstraction of the target buffers that a Camera should use to render it's scene va...
Definition: RenderTarget.h:33
~OsgRenderTarget()
Destructor.
Definition: OsgRenderTarget-inl.h:55
std::shared_ptr< OsgTexture > getDepthTargetOsg() const
Accessor for the depth target as an OsgTexture.
Definition: OsgRenderTarget-inl.h:142
virtual std::shared_ptr< OsgTexture > getColorTargetOsg(int index) const =0
Accessor for the color target as an OsgTexture.
int m_height
The height of this RenderTarget.
Definition: OsgRenderTarget.h:113
Definition: CompoundShapeToGraphics.cpp:29
int setColorTargetCount(int count)
Sets color target count.
Definition: OsgRenderTarget-inl.h:67
TargetTypes
Values that represent TargetTypes.
Definition: OsgRenderTarget.h:104
void getSize(int *width, int *height) const override
Gets a size.
Definition: OsgRenderTarget-inl.h:60
std::vector< std::shared_ptr< TextureType > > m_textures
The textures that are being used as target, size of this is 16 (ColorTargets) + 1 (Depth).
Definition: OsgRenderTarget.h:119
std::shared_ptr< Texture > getColorTarget(int index) const override
Generic accessor for a specific color target texture.
Definition: OsgRenderTarget-inl.h:91
OsgRenderTarget()
Default constructor.
Definition: OsgRenderTarget-inl.h:29
virtual std::shared_ptr< OsgTexture > getDepthTargetOsg() const =0
Accessor for the depth target as an OsgTexture.
OsgRenderTarget< OsgTextureRectangle > OsgRenderTargetRectangle
Definition: OsgRenderTarget.h:138
std::shared_ptr< OsgTexture > getColorTargetOsg(int index) const
Accessor for the color target as an OsgTexture.
Definition: OsgRenderTarget-inl.h:104
int getColorTargetCount() const override
Definition: OsgRenderTarget-inl.h:85
Definition: OsgRenderTarget.h:106
std::shared_ptr< Texture > getDepthTarget() const override
Generic accessor for the depth Target.
Definition: OsgRenderTarget-inl.h:136
int m_colorTargetCount
Number of color targets.
Definition: OsgRenderTarget.h:116
Osg abstract render target, this hides the type of the actual osg texture and lets us use OsgRenderTa...
Definition: OsgRenderTarget.h:37
Specific implementation of the render target class.
Definition: OsgRenderTarget.h:52
void useDepthTarget(bool val)
Use depth target.
Definition: OsgRenderTarget-inl.h:117
bool doesUseDepthTarget() const override
Determines if RenderTarget does use a depth target.
Definition: OsgRenderTarget-inl.h:130