Go to the documentation of this file.
17 #ifndef GZ_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_
23 #include <gz/math/Color.hh>
31 #pragma warning(push, 0)
33 #include <Compositor/OgreCompositorShadowNode.h>
49 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
52 class Ogre2RenderTargetPrivate;
65 public:
virtual unsigned int AntiAliasing()
const;
69 public:
virtual void SetAntiAliasing(
unsigned int _aa);
73 public:
virtual void Copy(
Image &_image)
const override;
77 public:
virtual Ogre::Camera *
Camera()
const;
81 public:
virtual void SetCamera(Ogre::Camera *_camera);
84 public:
virtual math::Color BackgroundColor()
const override;
88 public:
virtual void SetBackgroundColor(
math::Color _color);
92 public:
virtual void SetBackgroundMaterial(
MaterialPtr _material);
96 public:
virtual MaterialPtr BackgroundMaterial()
const;
99 public:
virtual void PreRender()
override;
102 public:
virtual void PostRender()
override;
105 public:
virtual void Render();
108 public:
virtual void Destroy()
override = 0;
116 public:
void SetShadowsNodeDefDirty();
121 protected: uint8_t TargetFSAA()
const;
126 protected: Ogre::TextureGpu *RenderTargetImpl()
const;
130 public:
virtual Ogre::TextureGpu *
RenderTarget()
const = 0;
134 public:
virtual bool IsRenderWindow()
const;
137 public:
unsigned int GLIdImpl()
const;
140 protected:
void DestroyTargetImpl();
143 protected:
void BuildTargetImpl();
148 public:
virtual uint32_t VisibilityMask()
const;
153 public:
virtual void SetVisibilityMask(uint32_t _mask);
156 public:
static void UpdateRenderPassChain(
157 Ogre::CompositorWorkspace *_workspace,
162 Ogre::TextureGpu *(*_ogreTextures)[2],
163 bool _isRenderWindow);
166 protected:
virtual void UpdateBackgroundColor();
169 protected:
virtual void UpdateBackgroundMaterial();
172 protected:
virtual void UpdateRenderPassChain();
175 protected:
virtual void RebuildImpl()
override;
178 protected:
virtual void RebuildTarget() = 0;
181 protected:
virtual void RebuildCompositor();
184 protected:
virtual void BuildCompositor();
187 protected:
virtual void DestroyCompositor();
193 protected:
void RebuildMaterial();
196 protected: Ogre::Camera *ogreCamera =
nullptr;
200 protected: Ogre::CompositorWorkspace *ogreCompositorWorkspace =
nullptr;
218 protected:
bool colorDirty =
true;
222 protected:
bool backgroundMaterialDirty =
false;
225 protected:
unsigned int antiAliasing = 4;
245 public:
virtual void Destroy()
override;
248 public:
virtual void PreRender()
override;
251 public:
virtual void PostRender()
override;
254 public:
virtual unsigned int GLId()
const override;
259 public:
virtual Ogre::TextureGpu *
RenderTarget()
const override;
262 protected:
virtual void RebuildTarget()
override;
265 protected:
virtual void DestroyTarget();
268 protected:
virtual void BuildTarget();
285 public:
virtual void Destroy()
override;
288 public:
virtual bool IsRenderWindow()
const override;
291 public:
virtual Ogre::TextureGpu *
RenderTarget()
const override;
294 protected:
virtual void RebuildTarget()
override;
297 protected:
virtual void BuildTarget();
300 protected: Ogre::TextureGpu *ogreRenderWindow =
nullptr;
Definition: gz/rendering/ogre/OgreCamera.hh:27
std::string ogreCompositorWorkspaceDefName
Ogre's compositor workspace definition name.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:203
Ogre2.x implementation of the render target class.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:55
Ogre2.x implementation of the render window class.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:275
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:49
MaterialPtr material
a material used by for the render target
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:212
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:57
Represents a render-target to which cameras can render images.
Definition: gz/rendering/RenderTarget.hh:37
#define IGN_VISIBILITY_ALL
Render everything visibility mask.
Definition: gz/rendering/RenderTypes.hh:26
Definition: gz/rendering/base/BaseRenderTarget.hh:35
MaterialPtr backgroundMaterial
Background material of the render target.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:209
Ogre2.x implementation of the render texture class.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:235
Ogre::ColourValue ogreBackgroundColor
Stores the background color of the render target.
Definition: gz/rendering/ogre2/Ogre2RenderTarget.hh:206
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:215