17 #ifndef GZ_RENDERING_OGRE_OGRERENDERENGINE_HH_
18 #define GZ_RENDERING_OGRE_OGRERENDERENGINE_HH_
25 #include <gz/common/SingletonT.hh>
32 #include "gz/rendering/ogre/Export.hh"
44 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
47 class OgreRenderEnginePrivate;
93 public:
virtual void Destroy()
override;
95 public:
virtual bool IsEnabled()
const override;
99 public: OgreRenderPathType RenderPathType()
const;
101 public:
void AddResourcePath(
const std::string &_uri)
override;
106 public:
virtual Ogre::Root *OgreRoot()
const;
109 const unsigned int _width,
const unsigned int _height,
110 const double _ratio,
const unsigned int _antiAliasing);
121 protected:
virtual ScenePtr CreateSceneImpl(
unsigned int _id,
131 protected:
virtual bool LoadImpl(
134 protected:
virtual bool InitImpl()
override;
136 private:
void LoadAttempt();
138 private:
void CreateLogger();
140 private:
void CreateContext();
142 private:
void CreateRoot();
144 private:
void CreateOverlay();
146 private:
void LoadPlugins();
148 private:
void CreateRenderSystem();
150 private:
void CreateResources();
152 private:
void CreateRenderWindow();
154 private:
void CheckCapabilities();
156 private:
void InitAttempt();
158 #if (OGRE_VERSION >= ((1 << 16) | (9 << 8) | 0))
159 public: Ogre::OverlaySystem *OverlaySystem()
const;
164 private: Ogre::OverlaySystem *ogreOverlaySystem =
nullptr;
169 private: OgreRenderPathType renderPathType;
171 private: Ogre::Root *ogreRoot =
nullptr;
173 private: Ogre::LogManager *ogreLogManager =
nullptr;
178 #if !defined(__APPLE__) && !defined(_WIN32)
179 private:
void *dummyDisplay =
nullptr;
181 private:
void *dummyContext =
nullptr;
184 private: uint64_t dummyWindowId = 0u;
187 private:
bool useCurrentGLContext =
false;