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;
105 TARGETTYPE_DEPTH = 0,
106 TARGETTYPE_COLORBASE = 1
124 int setColorTargetCount(
int count);
128 void useDepthTarget(
bool val);
132 void setupTexture(
int type);
Definition: CompoundShapeToGraphics.cpp:29
int m_colorTargetCount
Number of color targets.
Definition: OsgRenderTarget.h:116
virtual void getSize(int *width, int *height) const =0
Gets a size.
Osg abstract render target, this hides the type of the actual osg texture and lets us use OsgRenderTa...
Definition: OsgRenderTarget.h:37
RenderTarget is an abstraction of the target buffers that a Camera should use to render it's scene va...
Definition: RenderTarget.h:33
OsgRenderTarget< OsgTexture2d > OsgRenderTarget2d
Definition: OsgRenderTarget.h:137
virtual std::shared_ptr< Texture > getColorTarget(int index) const =0
Gets the indicated texture that is used as a target.
Specific implementation of the render target class.
Definition: OsgRenderTarget.h:52
virtual std::shared_ptr< OsgTexture > getColorTargetOsg(int index) const =0
Accessor for the color target as an OsgTexture.
OsgRenderTarget< OsgTextureRectangle > OsgRenderTargetRectangle
Definition: OsgRenderTarget.h:138
int m_width
The width of this RenderTarget.
Definition: OsgRenderTarget.h:110
virtual std::shared_ptr< OsgTexture > getDepthTargetOsg() const =0
Accessor for the depth target as an OsgTexture.
T TextureType
The internal type of the texture, not exposed in the public interface.
Definition: OsgRenderTarget.h:57
TargetTypes
Values that represent TargetTypes.
Definition: OsgRenderTarget.h:104
virtual bool doesUseDepthTarget() const =0
Check wether this draws into a depth texture.
virtual int getColorTargetCount() const =0
Returns the number of textures that this RenderTarget uses to draw into.
int m_height
The height of this RenderTarget.
Definition: OsgRenderTarget.h:113
virtual std::shared_ptr< Texture > getDepthTarget() const =0
Returns the texture that is used for the depth map drawing.
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