17 #ifndef GZ_RENDERING_OGRE_OGRERENDERTARGET_HH_
18 #define GZ_RENDERING_OGRE_OGRERENDERTARGET_HH_
20 #include <gz/math/Color.hh>
40 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
49 public:
virtual unsigned int AntiAliasing()
const;
51 public:
virtual void SetAntiAliasing(
unsigned int _aa);
53 public:
virtual void Copy(
Image &_image)
const override;
55 public:
virtual Ogre::Camera *
Camera()
const;
57 public:
virtual void SetCamera(Ogre::Camera *_camera);
60 public:
virtual math::Color BackgroundColor()
const override;
62 public:
virtual void SetBackgroundColor(
math::Color _color);
65 public:
virtual void PreRender()
override;
68 public:
virtual void PostRender()
override;
70 public:
virtual void Render();
72 public:
virtual void Destroy()
override = 0;
79 public:
virtual Ogre::RenderTarget *
RenderTarget()
const = 0;
81 public: Ogre::Viewport *AddViewport(Ogre::Camera *_viewport);
83 public: Ogre::Viewport *Viewport(
const int _viewportId)
const;
85 public:
void SetUpdate(
const bool _value);
87 public:
void SetAutoUpdated(
const bool _value);
92 public:
virtual void SetVisibilityMask(uint32_t _mask);
94 protected:
virtual void UpdateBackgroundColor();
97 protected:
virtual void UpdateRenderPassChain();
99 protected:
virtual void RebuildImpl()
override;
101 protected:
virtual void RebuildTarget() = 0;
103 protected:
virtual void RebuildViewport();
109 protected:
void RebuildMaterial();
111 protected: Ogre::Camera *ogreCamera =
nullptr;
113 protected: Ogre::Viewport *ogreViewport =
nullptr;
123 protected:
bool colorDirty =
true;
125 protected:
unsigned int antiAliasing = 4;
138 public:
virtual void Destroy()
override;
141 public:
virtual void PreRender()
override;
144 public:
virtual void PostRender()
override;
147 public:
virtual unsigned int GLId();
149 public:
virtual void Buffer(
float *buffer);
151 public:
virtual Ogre::RenderTarget *
RenderTarget()
const override;
153 protected:
virtual void RebuildTarget()
override;
155 protected:
virtual void DestroyTarget();
157 protected:
virtual void BuildTarget();
159 protected: Ogre::Texture *ogreTexture =
nullptr;
171 public:
virtual void Destroy();
173 protected:
virtual Ogre::RenderTarget *
RenderTarget()
const;
175 protected:
virtual void RebuildTarget();
177 protected:
virtual void BuildTarget();
179 protected: Ogre::RenderTarget *ogreRenderWindow =
nullptr;