Go to the documentation of this file.
17 #ifndef GZ_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_
22 #include <gz/math/Color.hh>
41 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
54 public:
virtual unsigned int AntiAliasing()
const;
58 public:
virtual void SetAntiAliasing(
unsigned int _aa);
62 public:
virtual void Copy(
Image &_image)
const override;
66 public:
virtual Ogre::Camera *
Camera()
const;
70 public:
virtual void SetCamera(Ogre::Camera *_camera);
73 public:
virtual math::Color BackgroundColor()
const override;
77 public:
virtual void SetBackgroundColor(
math::Color _color);
80 public:
virtual void PreRender()
override;
83 public:
virtual void PostRender()
override;
86 public:
virtual void Render();
89 public:
virtual void Destroy()
override = 0;
97 public:
virtual Ogre::RenderTarget *
RenderTarget()
const = 0;
100 public:
static void UpdateRenderPassChain(
101 Ogre::CompositorWorkspace *_workspace,
107 protected:
virtual void UpdateBackgroundColor();
110 protected:
virtual void UpdateRenderPassChain();
114 protected:
void UpdateShadowNode();
117 protected:
virtual void RebuildImpl()
override;
120 protected:
virtual void RebuildTarget() = 0;
123 protected:
virtual void RebuildCompositor();
126 protected:
virtual void BuildCompositor();
129 protected:
virtual void DestroyCompositor();
135 protected:
void RebuildMaterial();
150 private:
void CreateShadowNodeWithSettings(
151 Ogre::CompositorManager2 *_compositorManager,
153 const Ogre::ShadowNodeHelper::ShadowParamVec &_shadowParams);
156 protected: Ogre::Camera *ogreCamera =
nullptr;
160 protected: Ogre::CompositorWorkspace *ogreCompositorWorkspace =
nullptr;
175 protected:
bool colorDirty =
true;
178 protected:
unsigned int antiAliasing = 4;
192 public:
virtual void Destroy()
override;
195 public:
virtual void PreRender()
override;
198 public:
virtual void PostRender()
override;
201 public:
virtual unsigned int GLId()
const override;
204 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
207 protected:
virtual void RebuildTarget()
override;
210 protected:
virtual void DestroyTarget();
213 protected:
virtual void BuildTarget();
216 protected: Ogre::Texture *ogreTexture =
nullptr;
233 public:
virtual void Destroy()
override;
236 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
239 protected:
virtual void RebuildTarget()
override;
242 protected:
virtual void BuildTarget();
245 protected: Ogre::RenderTarget *ogreRenderWindow =
nullptr;
Definition: gz/rendering/ogre/OgreCamera.hh:27
std::string ogreCompositorWorkspaceDefName
Ogre's compositor workspace definition name.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:163
Ogre2.x implementation of the render target class.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:44
Ogre2.x implementation of the render window class.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:223
Encapsulates a raw image buffer and relevant properties.
Definition: gz/rendering/Image.hh:36
Posable camera used for rendering the scene graph.
Definition: gz/rendering/Camera.hh:40
MaterialPtr material
a material used by for the render target
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:169
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:41
Represents a render-target to which cameras can render images.
Definition: gz/rendering/RenderTarget.hh:37
Definition: gz/rendering/base/BaseRenderTarget.hh:35
Ogre2.x implementation of the render texture class.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:182
Ogre::ColourValue ogreBackgroundColor
Stores the background color of the render target.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:166
Definition: gz/rendering/base/BaseRenderTarget.hh:111
Definition: gz/rendering/base/BaseRenderTarget.hh:98
Ogre2RenderTargetMaterialPtr materialApplicator
Helper class that applies the material to the render target.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:172