17 #ifndef GZ_RENDERING_OGRE2_OGRE2RENDERENGINE_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2RENDERENGINE_HH_
25 #include <gz/common/SingletonT.hh>
33 #include "gz/rendering/ogre2/Export.hh"
45 class HlmsPbsTerraShadows;
46 class CompositorWorkspaceListener;
53 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
56 class Ogre2RenderEnginePrivate;
57 class Ogre2GzHlmsSphericalClipMinDistance;
92 public:
virtual void Destroy()
override;
95 public:
virtual bool IsEnabled()
const override;
102 public:
void AddResourcePath(
const std::string &_uri)
override;
105 public: Ogre::Window * OgreWindow()
const;
109 public:
virtual Ogre::Root *OgreRoot()
const;
120 const unsigned int _width,
const unsigned int _height,
121 const double _ratio,
const unsigned int _antiAliasing);
129 protected:
virtual ScenePtr CreateSceneImpl(
unsigned int _id,
138 protected:
virtual bool LoadImpl(
143 protected:
virtual bool InitImpl()
override;
146 private:
void LoadAttempt();
149 private:
void CreateLogger();
152 private:
void CreateContext();
155 private:
void RegisterHlms();
158 private:
void CreateRoot();
161 private:
void CreateOverlay();
164 private:
void LoadPlugins();
167 private:
void CreateRenderSystem();
170 private:
void CreateRenderWindow();
173 private:
void CreateResources();
176 private:
void InitAttempt();
183 public: Ogre2GzHlmsSphericalClipMinDistance GZ_DEPRECATED(7) &
184 HlmsCustomizations();
188 public: Ogre2GzHlmsSphericalClipMinDistance &SphericalClipMinDistance();
193 public: Ogre::v1::OverlaySystem *OverlaySystem()
const;
202 inline void GZ_DEPRECATED(7) SetIgnOgreRenderingMode(
205 return SetGzOgreRenderingMode(renderingMode);
214 public: Ogre::HlmsPbsTerraShadows *HlmsPbsTerraShadows()
const;
224 public: Ogre::CompositorWorkspaceListener
225 *TerraWorkspaceListener()
const;
233 private: Ogre::v1::OverlaySystem *ogreOverlaySystem =
nullptr;
239 private: Ogre::Root *ogreRoot =
nullptr;
242 private: Ogre::LogManager *ogreLogManager =
nullptr;
248 private:
void *dummyDisplay =
nullptr;
251 private:
void *dummyContext =
nullptr;
254 private: uint64_t dummyWindowId = 0u;
257 private: Ogre::Window *window =
nullptr;
260 private:
bool useCurrentGLContext =
false;