17 #ifndef IGNITION_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_ 18 #define IGNITION_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_ 42 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
45 class Ogre2RenderTargetPrivate;
58 public:
virtual unsigned int AntiAliasing()
const;
62 public:
virtual void SetAntiAliasing(
unsigned int _aa);
66 public:
virtual void Copy(
Image &_image)
const override;
70 public:
virtual Ogre::Camera *
Camera()
const;
74 public:
virtual void SetCamera(Ogre::Camera *_camera);
77 public:
virtual math::Color BackgroundColor()
const override;
81 public:
virtual void SetBackgroundColor(
math::Color _color);
84 public:
virtual void PreRender()
override;
87 public:
virtual void PostRender()
override;
90 public:
virtual void Render();
93 public:
virtual void Destroy()
override = 0;
101 public:
virtual Ogre::RenderTarget *
RenderTarget()
const = 0;
106 public:
virtual uint32_t VisibilityMask()
const;
111 public:
virtual void SetVisibilityMask(uint32_t _mask);
114 public:
static void UpdateRenderPassChain(
115 Ogre::CompositorWorkspace *_workspace,
121 protected:
virtual void UpdateBackgroundColor();
124 protected:
virtual void UpdateRenderPassChain();
128 protected:
void UpdateShadowNode();
131 protected:
virtual void RebuildImpl()
override;
134 protected:
virtual void RebuildTarget() = 0;
137 protected:
virtual void RebuildCompositor();
140 protected:
virtual void BuildCompositor();
143 protected:
virtual void DestroyCompositor();
149 protected:
void RebuildMaterial();
164 private:
void CreateShadowNodeWithSettings(
165 Ogre::CompositorManager2 *_compositorManager,
167 const Ogre::ShadowNodeHelper::ShadowParamVec &_shadowParams);
170 protected: Ogre::Camera *ogreCamera =
nullptr;
174 protected: Ogre::CompositorWorkspace *ogreCompositorWorkspace =
nullptr;
189 protected:
bool colorDirty =
true;
192 protected:
unsigned int antiAliasing = 4;
212 public:
virtual void Destroy()
override;
215 public:
virtual void PreRender()
override;
218 public:
virtual void PostRender()
override;
221 public:
virtual unsigned int GLId()
const override;
224 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
227 protected:
virtual void RebuildTarget()
override;
230 protected:
virtual void DestroyTarget();
233 protected:
virtual void BuildTarget();
236 protected: Ogre::Texture *ogreTexture =
nullptr;
253 public:
virtual void Destroy()
override;
256 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
259 protected:
virtual void RebuildTarget()
override;
262 protected:
virtual void BuildTarget();
265 protected: Ogre::RenderTarget *ogreRenderWindow =
nullptr;
Definition: BaseRenderTarget.hh:98
Ogre::ColourValue ogreBackgroundColor
Stores the background color of the render target.
Definition: Ogre2RenderTarget.hh:180
#define IGN_VISIBILITY_ALL
Render everything visibility mask.
Definition: RenderTypes.hh:26
MaterialPtr material
a material used by for the render target
Definition: Ogre2RenderTarget.hh:183
Ogre2.x implementation of the render window class.
Definition: Ogre2RenderTarget.hh:243
Definition: BaseRenderTarget.hh:35
std::string ogreCompositorWorkspaceDefName
Ogre's compositor workspace definition name.
Definition: Ogre2RenderTarget.hh:177
Ogre2.x implementation of the scene class.
Definition: Ogre2Scene.hh:45
Represents a render-target to which cameras can render images.
Definition: RenderTarget.hh:37
Definition: BaseRenderTarget.hh:111
Encapsulates a raw image buffer and relevant properties.
Definition: Image.hh:36
Ogre2RenderTargetMaterialPtr materialApplicator
Helper class that applies the material to the render target.
Definition: Ogre2RenderTarget.hh:186
Posable camera used for rendering the scene graph.
Definition: Camera.hh:40
Ogre2.x implementation of the render texture class.
Definition: Ogre2RenderTarget.hh:202
Definition: OgreCamera.hh:27
Ogre2.x implementation of the render target class.
Definition: Ogre2RenderTarget.hh:48