Orxonox
0.0.5 Codename: Arcturus
|
Graphics engine manager class. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/GraphicsManager.h>
Public Member Functions | |
GraphicsManager (bool bLoadRenderer=true) | |
~GraphicsManager ()=default | |
Leave empty and use cleanup() instead. More... | |
void | destroy () |
Destructor that also executes when object fails to construct. More... | |
std::string | getFSAAMode () const |
Ogre::OverlaySystem * | getOverlaySystem () |
Ogre::RenderWindow * | getRenderWindow () |
size_t | getRenderWindowHandle () |
Ogre::Viewport * | getViewport () |
unsigned int | getWindowHeight () const |
unsigned int | getWindowWidth () const |
bool | hasVSyncEnabled () const |
bool | isFullScreen () const |
void | loadDebugOverlay () |
void | postUpdate (const Clock &time) |
bool | rendererLoaded () const |
void | setCamera (Ogre::Camera *camera) |
void | setConfigValues () |
void | unloadDebugOverlay () |
void | upgradeToGraphics () |
Loads the renderer and creates the render window if not yet done so. More... | |
Public Member Functions inherited from orxonox::Configurable | |
Configurable () | |
void | setConfigValues () |
Function to collect the SetConfigValue-macro calls. More... | |
Public Member Functions inherited from orxonox::Listable | |
Listable () | |
Constructor: Allocates space in the element list. More... | |
Listable (Context *context) | |
Constructor: Allocates space in the element list and assigns the context. More... | |
virtual | ~Listable () |
Destructor: Removes the object from the object-lists. More... | |
Context * | getContext () const |
void | setContext (Context *context) |
Changes the context. More... | |
void | unregisterObject () |
Removes this object from the object-lists. More... | |
Public Member Functions inherited from orxonox::Identifiable | |
Identifiable () | |
Constructor: Sets the default values. More... | |
virtual | ~Identifiable () |
ORX_FORCEINLINE void * | getDerivedPointer (unsigned int classID) |
Returns a valid pointer of any derived type that is registered in the class hierarchy. More... | |
template<class T > | |
ORX_FORCEINLINE T * | getDerivedPointer (unsigned int classID) |
Version of getDerivedPointer with template. More... | |
template<class T > | |
ORX_FORCEINLINE const T * | getDerivedPointer (unsigned int classID) const |
Const version of getDerivedPointer with template. More... | |
Identifier * | getIdentifier () const |
Returns the Identifier of the object. More... | |
bool | isA (const Identifier *identifier) |
Returns true if the object's class is of the given type or a derivative. More... | |
template<class B > | |
bool | isA (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is of the given type or a derivative. More... | |
bool | isA (const Identifiable *object) |
Returns true if the object's class is of the given type or a derivative. More... | |
bool | isChildOf (const Identifier *identifier) |
Returns true if the object's class is a child of the given type. More... | |
template<class B > | |
bool | isChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a child of the given type. More... | |
bool | isChildOf (const Identifiable *object) |
Returns true if the object's class is a child of the given type. More... | |
bool | isDirectChildOf (const Identifier *identifier) |
Returns true if the object's class is a direct child of the given type. More... | |
template<class B > | |
bool | isDirectChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isDirectChildOf (const Identifiable *object) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isDirectParentOf (const Identifier *identifier) |
Returns true if the object's class is a direct parent of the given type. More... | |
template<class B > | |
bool | isDirectParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a direct parent of the given type. More... | |
bool | isDirectParentOf (const Identifiable *object) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isExactlyA (const Identifier *identifier) |
Returns true if the object's class is exactly of the given type. More... | |
template<class B > | |
bool | isExactlyA (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is exactly of the given type. More... | |
bool | isExactlyA (const Identifiable *object) |
Returns true if the object's class is exactly of the given type. More... | |
bool | isParentOf (const Identifier *identifier) |
Returns true if the object's class is a parent of the given type. More... | |
template<class B > | |
bool | isParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a parent of the given type. More... | |
bool | isParentOf (const Identifiable *object) |
Returns true if the object's class is a parent of the given type. More... | |
Static Public Member Functions | |
static GraphicsManager & | getInstance () |
Static Public Member Functions inherited from orxonox::Singleton< GraphicsManager > | |
static bool | exists () |
Tells whether the singleton has been created. More... | |
static GraphicsManager & | getInstance () |
Returns a reference to the singleton instance. More... | |
Private Member Functions | |
GraphicsManager (const GraphicsManager &)=delete | |
void | loadOgrePlugins () |
void | loadOgreRoot () |
Creates the Ogre Root object and sets up the ogre log. More... | |
void | loadRenderer () |
virtual void | messageLogged (const std::string &message, Ogre::LogMessageLevel lml, bool maskDebug, const std::string &logName) override |
Method called by the LogListener interface from Ogre. More... | |
GraphicsManager & | operator= (const GraphicsManager &)=delete |
void | printScreen () |
std::string | setFSAA (const std::string &mode) |
std::string | setScreenResolution (unsigned int width, unsigned int height, bool fullscreen) |
std::string | setVSync (bool vsync) |
Private Attributes | |
std::shared_ptr< XMLFile > | debugOverlay_ |
XML with various debug overlays. More... | |
DestructionHelper< GraphicsManager > | destructionHelper_ |
Helper object that executes the surrogate destructor destroy() More... | |
std::shared_ptr< XMLFile > | extResources_ |
XML with resource locations in the external path (only for dev runs) More... | |
GlowMaterialListener * | glowMaterialListener_ |
Material Listener for the 'Glow' compositor. More... | |
float | lastFrameEndTime_ |
Time stamp of the end of the last frame. More... | |
float | lastFrameStartTime_ |
Time stamp of the beginning of the last frame. More... | |
std::string | ogreConfigFile_ |
ogre config filename More... | |
std::string | ogreLogFile_ |
log filename for Ogre log messages More... | |
Ogre::LogManager * | ogreLogger_ |
std::string | ogrePlugins_ |
Comma separated list of all plugins to load. More... | |
Ogre::Root * | ogreRoot_ |
Ogre's root. More... | |
OgreWindowEventListener * | ogreWindowEventListener_ |
Pimpl to hide OgreWindowUtilities.h. More... | |
Ogre::OverlaySystem * | overlaySystem_ |
Ogre::RenderWindow * | renderWindow_ |
the one and only render window More... | |
std::shared_ptr< XMLFile > | resources_ |
XML with resource locations. More... | |
Ogre::Viewport * | viewport_ |
default full size viewport More... | |
Static Private Attributes | |
static GraphicsManager * | singletonPtr_s = nullptr |
Pointer to the Singleton. More... | |
Friends | |
class | Singleton< GraphicsManager > |
Additional Inherited Members | |
Protected Member Functions inherited from orxonox::Singleton< GraphicsManager > | |
Singleton () | |
Constructor sets the singleton instance pointer. More... | |
virtual | ~Singleton () |
Destructor resets the singleton instance pointer. More... | |
Graphics engine manager class.
orxonox::GraphicsManager::GraphicsManager | ( | bool | bLoadRenderer = true | ) |
|
default |
Leave empty and use cleanup() instead.
|
privatedelete |
void orxonox::GraphicsManager::destroy | ( | ) |
Destructor that also executes when object fails to construct.
std::string orxonox::GraphicsManager::getFSAAMode | ( | ) | const |
|
inlinestatic |
|
inline |
|
inline |
size_t orxonox::GraphicsManager::getRenderWindowHandle | ( | ) |
|
inline |
unsigned int orxonox::GraphicsManager::getWindowHeight | ( | ) | const |
unsigned int orxonox::GraphicsManager::getWindowWidth | ( | ) | const |
bool orxonox::GraphicsManager::hasVSyncEnabled | ( | ) | const |
bool orxonox::GraphicsManager::isFullScreen | ( | ) | const |
void orxonox::GraphicsManager::loadDebugOverlay | ( | ) |
|
private |
|
private |
Creates the Ogre Root object and sets up the ogre log.
|
private |
|
overrideprivatevirtual |
Method called by the LogListener interface from Ogre.
We use it to capture Ogre log messages and handle it ourselves.
message | The message to be logged |
lml | The message level the log is using |
maskDebug | If we are printing to the console or not |
logName | The name of this log (so you can have several listeners for different logs, and identify them) |
skipThisMessage | If set to true by the messageLogged() implementation message will not be logged |
|
privatedelete |
|
private |
|
inline |
void orxonox::GraphicsManager::setCamera | ( | Ogre::Camera * | camera | ) |
|
private |
|
private |
|
private |
void orxonox::GraphicsManager::unloadDebugOverlay | ( | ) |
void orxonox::GraphicsManager::upgradeToGraphics | ( | ) |
Loads the renderer and creates the render window if not yet done so.
|
friend |
|
private |
XML with various debug overlays.
|
private |
Helper object that executes the surrogate destructor destroy()
|
private |
XML with resource locations in the external path (only for dev runs)
|
private |
Material Listener for the 'Glow' compositor.
|
private |
Time stamp of the end of the last frame.
|
private |
Time stamp of the beginning of the last frame.
|
private |
ogre config filename
|
private |
log filename for Ogre log messages
|
private |
|
private |
Comma separated list of all plugins to load.
|
private |
Ogre's root.
|
private |
Pimpl to hide OgreWindowUtilities.h.
|
private |
|
private |
the one and only render window
|
private |
XML with resource locations.
|
staticprivate |
Pointer to the Singleton.
|
private |
default full size viewport