17 #ifndef IGNITION_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_ 18 #define IGNITION_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_ 41 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
44 class Ogre2RenderTargetPrivate;
57 public:
virtual unsigned int AntiAliasing()
const;
61 public:
virtual void SetAntiAliasing(
unsigned int _aa);
65 public:
virtual void Copy(
Image &_image)
const override;
69 public:
virtual Ogre::Camera *
Camera()
const;
73 public:
virtual void SetCamera(Ogre::Camera *_camera);
76 public:
virtual math::Color BackgroundColor()
const override;
80 public:
virtual void SetBackgroundColor(
math::Color _color);
83 public:
virtual void PreRender()
override;
86 public:
virtual void PostRender()
override;
89 public:
virtual void Render();
92 public:
virtual void Destroy()
override = 0;
100 public:
virtual Ogre::RenderTarget *
RenderTarget()
const = 0;
105 public:
virtual uint32_t VisibilityMask()
const;
110 public:
virtual void SetVisibilityMask(uint32_t _mask);
113 protected:
virtual void UpdateBackgroundColor();
116 protected:
virtual void UpdateRenderPassChain();
120 protected:
void UpdateShadowNode();
123 protected:
virtual void RebuildImpl()
override;
126 protected:
virtual void RebuildTarget() = 0;
129 protected:
virtual void RebuildCompositor();
132 protected:
virtual void BuildCompositor();
135 protected:
virtual void DestroyCompositor();
141 protected:
void RebuildMaterial();
156 private:
void CreateShadowNodeWithSettings(
157 Ogre::CompositorManager2 *_compositorManager,
159 const Ogre::ShadowNodeHelper::ShadowParamVec &_shadowParams);
162 protected: Ogre::Camera *ogreCamera =
nullptr;
166 protected: Ogre::CompositorWorkspace *ogreCompositorWorkspace =
nullptr;
181 protected:
bool colorDirty =
true;
184 protected:
unsigned int antiAliasing = 4;
204 public:
virtual void Destroy()
override;
207 public:
virtual void PreRender()
override;
210 public:
virtual void PostRender()
override;
213 public:
virtual unsigned int GLId()
const override;
216 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
219 protected:
virtual void RebuildTarget()
override;
222 protected:
virtual void DestroyTarget();
225 protected:
virtual void BuildTarget();
228 protected: Ogre::Texture *ogreTexture =
nullptr;
245 public:
virtual void Destroy()
override;
248 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
251 protected:
virtual void RebuildTarget()
override;
254 protected:
virtual void BuildTarget();
257 protected: Ogre::RenderTarget *ogreRenderWindow =
nullptr;
Definition: BaseRenderTarget.hh:98
Ogre::ColourValue ogreBackgroundColor
Stores the background color of the render target.
Definition: Ogre2RenderTarget.hh:172
#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:175
Ogre2.x implementation of the render window class.
Definition: Ogre2RenderTarget.hh:235
Definition: BaseRenderTarget.hh:35
std::string ogreCompositorWorkspaceDefName
Ogre's compositor workspace definition name.
Definition: Ogre2RenderTarget.hh:169
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:178
Posable camera used for rendering the scene graph.
Definition: Camera.hh:40
Ogre2.x implementation of the render texture class.
Definition: Ogre2RenderTarget.hh:194
Definition: OgreCamera.hh:27
Ogre2.x implementation of the render target class.
Definition: Ogre2RenderTarget.hh:47