17 #ifndef IGNITION_RENDERING_OGRE2_OGRE2RENDERTARGET_HH_ 18 #define IGNITION_RENDERING_OGRE2_OGRE2RENDERTARGET_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 public:
void MetalIdImpl(
void *_textureIdPtr)
const;
143 protected:
void DestroyTargetImpl();
146 protected:
void BuildTargetImpl();
151 public:
virtual uint32_t VisibilityMask()
const;
156 public:
virtual void SetVisibilityMask(uint32_t _mask);
159 public:
static void UpdateRenderPassChain(
160 Ogre::CompositorWorkspace *_workspace,
165 Ogre::TextureGpu *(*_ogreTextures)[2],
166 bool _isRenderWindow);
169 protected:
virtual void UpdateBackgroundColor();
172 protected:
virtual void UpdateBackgroundMaterial();
175 protected:
virtual void UpdateRenderPassChain();
178 protected:
virtual void RebuildImpl()
override;
181 protected:
virtual void RebuildTarget() = 0;
184 protected:
virtual void RebuildCompositor();
187 protected:
virtual void BuildCompositor();
190 protected:
virtual void DestroyCompositor();
196 protected:
void RebuildMaterial();
199 protected: Ogre::Camera *ogreCamera =
nullptr;
203 protected: Ogre::CompositorWorkspace *ogreCompositorWorkspace =
nullptr;
221 protected:
bool colorDirty =
true;
225 protected:
bool backgroundMaterialDirty =
false;
228 protected:
unsigned int antiAliasing = 4;
248 public:
virtual void Destroy()
override;
251 public:
virtual void PreRender()
override;
254 public:
virtual void PostRender()
override;
257 public:
virtual unsigned int GLId()
const override;
260 public:
virtual void MetalId(
void *_textureIdPtr)
const override;
265 public:
virtual Ogre::TextureGpu *
RenderTarget()
const override;
268 protected:
virtual void RebuildTarget()
override;
271 protected:
virtual void DestroyTarget();
274 protected:
virtual void BuildTarget();
291 public:
virtual void Destroy()
override;
294 public:
virtual bool IsRenderWindow()
const override;
297 public:
virtual Ogre::TextureGpu *
RenderTarget()
const override;
300 protected:
virtual void RebuildTarget()
override;
303 protected:
virtual void BuildTarget();
306 protected: Ogre::TextureGpu *ogreRenderWindow =
nullptr;
#define IGN_VISIBILITY_ALL
Render everything visibility mask.
Definition: RenderTypes.hh:26
Definition: BaseRenderTarget.hh:98
Ogre::ColourValue ogreBackgroundColor
Stores the background color of the render target.
Definition: Ogre2RenderTarget.hh:209
MaterialPtr material
a material used by for the render target
Definition: Ogre2RenderTarget.hh:215
Ogre2.x implementation of the render window class.
Definition: Ogre2RenderTarget.hh:281
Definition: BaseRenderTarget.hh:35
std::string ogreCompositorWorkspaceDefName
Ogre's compositor workspace definition name.
Definition: Ogre2RenderTarget.hh:206
Ogre2.x implementation of the scene class.
Definition: Ogre2Scene.hh:57
Represents a render-target to which cameras can render images.
Definition: RenderTarget.hh:37
Definition: BaseRenderTarget.hh:114
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:218
MaterialPtr backgroundMaterial
Background material of the render target.
Definition: Ogre2RenderTarget.hh:212
Posable camera used for rendering the scene graph.
Definition: Camera.hh:49
Ogre2.x implementation of the render texture class.
Definition: Ogre2RenderTarget.hh:238
Definition: OgreCamera.hh:28
Ogre2.x implementation of the render target class.
Definition: Ogre2RenderTarget.hh:55