16 #ifndef SURGSIM_GRAPHICS_OSGRENDERTARGET_H 17 #define SURGSIM_GRAPHICS_OSGRENDERTARGET_H 20 #include <unordered_map> 22 #include "SurgSim/Graphics/RenderTarget.h" 23 #include "SurgSim/Graphics/OsgTexture.h" 24 #include "SurgSim/Graphics/OsgTexture2d.h" 25 #include "SurgSim/Graphics/OsgTextureRectangle.h" 27 #include <osg/FrameBufferObject> 42 virtual std::shared_ptr<OsgTexture> getColorTargetOsg(
int index)
const = 0;
46 virtual std::shared_ptr<OsgTexture> getDepthTargetOsg()
const = 0;
69 int colorCount = 0,
bool useDepth =
false,
bool useFloat =
false);
75 void getSize(
int* width,
int* height)
const override;
88 std::shared_ptr<OsgTexture> getColorTargetOsg(
int index)
const;
100 std::shared_ptr<OsgTexture> getDepthTargetOsg()
const;
106 TARGETTYPE_DEPTH = 0,
107 TARGETTYPE_COLORBASE = 1
117 int m_colorTargetCount;
120 std::vector<std::shared_ptr<TextureType>> m_textures;
126 int setColorTargetCount(
int count,
bool floatColor);
130 void useDepthTarget(
bool val);
135 void setupTexture(
int type,
bool floatColor);
147 #include "SurgSim/Graphics/OsgRenderTarget-inl.h" Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
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
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
T TextureType
The internal type of the texture, not exposed in the public interface.
Definition: OsgRenderTarget.h:57
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.
virtual std::shared_ptr< Texture > getDepthTarget() const =0
Returns the texture that is used for the depth map drawing.