Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Mezzanine::Graphics::GraphicsManager Class Reference

This is intended to store basic graphics setting for the user. More...

#include <graphicsmanager.h>

+ Inheritance diagram for Mezzanine::Graphics::GraphicsManager:
+ Collaboration diagram for Mezzanine::Graphics::GraphicsManager:

Public Types

typedef GameWindowContainer::const_iterator ConstGameWindowIterator
 Const Iterator type for GameWindow instances stored by this class.
 
typedef ResolutionContainer::const_iterator ConstResolutionIterator
 Const Iterator type for stored supported resolutions.
 
typedef std::vector< GameWindow * > GameWindowContainer
 Basic container type for GameWindow storage by this class.
 
typedef GameWindowContainer::iterator GameWindowIterator
 Iterator type for GameWindow instances stored by this class.
 
typedef std::vector< RenderSystemRenderSystemTypeContainer
 Basic container type for registered rendersystem type storage by this class.
 
typedef std::vector< ResolutionResolutionContainer
 Basic container type for storing the detected supported fullscreen resolutions on the current system.
 
typedef ResolutionContainer::iterator ResolutionIterator
 Iterator type for stored supported resolutions.
 
- Public Types inherited from Mezzanine::ManagerBase
enum  ManagerType {
  MT_Undefined = 0, MT_AudioManager = 1, MT_AnimationManager = 2, MT_CollisionShapeManager = 3,
  MT_CompositorManager = 4, MT_GraphicsManager = 5, MT_EventManager = 6, MT_InputManager = 7,
  MT_LogManager = 8, MT_MaterialManager = 9, MT_MeshManager = 10, MT_NetworkManager = 11,
  MT_ResourceManager = 12, MT_ScriptingManager = 13, MT_TextureManager = 14, MT_UIManager = 15,
  MT_ActorManager = 101, MT_AreaEffectManager = 102, MT_DebrisManager = 103, MT_PagingManager = 104,
  MT_PhysicsManager = 105, MT_SceneManager = 106, MT_SoundScapeManager = 107, MT_TerrainManager = 108,
  MT_VehicleManager = 109, MT_UserCreated = 512
}
 A listing of Manager Types. More...
 
- Public Types inherited from Mezzanine::ObjectSettingsHandler
typedef SettingFilesContainer::const_iterator ConstSettingFilesIterator
 Const Iterator type for ObjectSettingGroup instances stored by this class.
 
typedef SettingGroupContainer::const_iterator ConstSettingGroupIterator
 Const Iterator type for ObjectSettingGroup instances stored by this class.
 
typedef std::map< String, ObjectSettingFile * > SettingFilesContainer
 Basic container type for ObjectSettingFile storage by this class.
 
typedef SettingFilesContainer::iterator SettingFilesIterator
 Iterator type for ObjectSettingGroup instances stored by this class.
 
typedef std::map< String, ObjectSettingGroup * > SettingGroupContainer
 Basic container type for ObjectSettingGroup storage by this class.
 
typedef SettingGroupContainer::iterator SettingGroupIterator
 Iterator type for ObjectSettingGroup instances stored by this class.
 
typedef std::vector< ObjectSettingGroup * > SettingGroupVector
 Convenience typedef for Load method returns.
 

Public Member Functions

 GraphicsManager ()
 Basic constructor. More...
 
 GraphicsManager (const XML::Node &XMLNode)
 XML constructor. More...
 
virtual ~GraphicsManager ()
 Class Destructor.
 
GameWindowIterator BeginGameWindow ()
 Gets an iterator to the first GameWindow stored in this manager.
 
ConstGameWindowIterator BeginGameWindow () const
 Gets a const iterator to the first GameWindow stored in this manager.
 
GameWindowCreateGameWindow (const String &WindowCaption, const Whole &Width, const Whole &Height, const Whole &Flags)
 Creates a new game window to be rendered to. More...
 
virtual void Deinitialize ()
 Removes this manager from any necessary configuration so it can be safely disposed of. More...
 
void DestroyAllGameWindows (Boole ExcludePrimary=true)
 Destroys every game window created. More...
 
void DestroyGameWindow (GameWindow *ToBeDestroyed)
 Destroys a created game window by index. More...
 
GameWindowIterator EndGameWindow ()
 Gets an iterator to one passed the last GameWindow stored in this manager.
 
ConstGameWindowIterator EndGameWindow () const
 Gets a const iterator to one passed the last GameWindow stored in this manager.
 
Graphics::RenderSystem GetCurrRenderSystem ()
 Gets the current rendersystem being used. More...
 
const WindowSettingsGetDesktopSettings () const
 Gets the desktop display settings. More...
 
GameWindowGetGameWindow (const Whole &Index) const
 Gets a game window by index. More...
 
GameWindowGetGameWindow (const String &Caption) const
 Gets a game window by it's caption text. More...
 
virtual String GetImplementationTypeName () const
 This Allows any manager name to be sent to a stream. Primarily used for logging. More...
 
virtual ManagerType GetInterfaceType () const
 This returns the type of this manager. More...
 
Whole GetNumGameWindows () const
 Gets the number of game windows within this manager. More...
 
GameWindowGetPrimaryGameWindow ()
 Gets the primary(first) game window. More...
 
String GetRenderSystemName (const Graphics::RenderSystem &RenderSys)
 Gets the name of the provided render system. More...
 
RenderWorkUnitGetRenderWork ()
 Gets the work unit responsible for performing the graphics render of all scenes. More...
 
String GetShortenedRenderSystemName (const Graphics::RenderSystem &RenderSys)
 Gets a short hand name of the provided render system. More...
 
const StringVectorGetSupportedDevices () const
 Gets a vector containing all the devices supported by this render system on the current hardware. More...
 
const ResolutionContainerGetSupportedResolutions () const
 Gets a vector containing all the resolutions supported by this render system on the current hardware. More...
 
Boole HasOgreBeenInitialized ()
 Gets whether or not Ogre has been started. More...
 
Boole HasSDLBeenInitialized ()
 Gets whether or not SDL has been started. More...
 
virtual void Initialize ()
 Configures this manager for use prior to entering the main loop. More...
 
virtual void RenderOneFrame ()
 Renders one frame of the scene.
 
void SetRenderSystem (const Graphics::RenderSystem &RenderSys, Boole InitializeRenderSystem=false)
 Sets the render system to be used. More...
 
virtual void SwapAllBuffers (Boole WaitForVsync)
 Swaps all the buffers of all GameWindows. More...
 
- Public Member Functions inherited from Mezzanine::EntresolManager
 EntresolManager ()
 Class constructor.
 
virtual ~EntresolManager ()
 Class destructor.
 
- Public Member Functions inherited from Mezzanine::ManagerBase
 ManagerBase ()
 Class constructor.
 
virtual ~ManagerBase ()
 Class destructor.
 
virtual String GetInterfaceTypeAsString () const
 Gets a string of the interface type of this manager. More...
 
Boole IsInitialized () const
 Gets whether or not this manager has been initialized. More...
 
- Public Member Functions inherited from Mezzanine::ObjectSettingsHandler
 ObjectSettingsHandler ()
 Class constructor.
 
virtual ~ObjectSettingsHandler ()
 Class destructor.
 
void AddGroupToFile (ObjectSettingGroup *Group, const String &FileName)
 Assigns a SettingGroup to a file name that will be used when settings are saved. More...
 
void ApplySettingGroup (const String &GroupName)
 Applies all the settings (and their values) defined in a setting group. More...
 
ObjectSettingFileCreateSettingFile (const String &FileName)
 Creates a new Setting file that will track which groups are a part of it. More...
 
ObjectSettingGroupCreateSettingGroup (const String &Name)
 Creates a new blank setting group that can have it's settings populated. More...
 
void DestroyAllSettingFiles ()
 Destroys all Setting files in this handler. More...
 
void DestroyAllSettingGroups ()
 Destroys all setting groups stored in this handler.
 
void DestroySettingFile (const String &FileName)
 Destroys a Setting file by name. More...
 
void DestroySettingFile (ObjectSettingFile *ToBeDestroyed)
 Destroys a Setting file. More...
 
void DestroySettingGroup (const String &Name)
 Destroys a setting group by name. More...
 
void DestroySettingGroup (ObjectSettingGroup *ToBeDestroyed)
 Destroys a setting group. More...
 
Boole GetAutoGenFiles () const
 Gets whether or not this object is currently allowed to create/update settings files upon initialization and destruction. More...
 
Boole GetAutoGenPath () const
 Gets whether or not this object is currently allowed to create folders when saving. More...
 
ConstStringGetCurrentSettingsSaveFile () const
 Gets the name of the file the "Current" setting group is saved to. More...
 
ObjectSettingFileGetSettingFile (const String &FileName)
 Gets a Setting file by name. More...
 
ObjectSettingGroupGetSettingGroup (const String &Name) const
 Gets a setting group by name. More...
 
const StringGetSettingsFilePath () const
 Gets the currently set settings file path. More...
 
CountedPtr< SettingGroupVectorLoadSettings (const String &FileName, const String &Path)
 Loads settings from a settings file. More...
 
CountedPtr< SettingGroupVectorLoadSettings (const String &FileName)
 Loads settings from a settings file using the specified settings path. More...
 
CountedPtr< SettingGroupVectorLoadSettingsFromGroup (const String &FileName, const String &Group)
 Loads settings from a settings file. More...
 
CountedPtr< SettingGroupVectorLoadSettingsFromXML (XML::Node &RootSettings)
 Loads settings from an xml node. More...
 
void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
void ProtoSerialize (XML::Node &SelfRoot) const
 Convert this class to an XML::Node ready for serialization. More...
 
void RemoveGroupFromFile (ObjectSettingGroup *Group, const String &FileName)
 Removes a previously assigned group from a save file name. More...
 
void SaveAllSettings ()
 Saves all settings that need saving. More...
 
void SaveSettingGroups (StringVector &GroupNames, const String &FileName, const String &Path)
 Saves all settings to a settings file. More...
 
void SaveSettingGroups (StringVector &GroupNames, const String &FileName)
 Saves all settings to a settings file using the specified settings path. More...
 
void SaveSettingsByFile (const String &FileName, const String &Path)
 Saves all settings that have their optional filename set to the specified file. More...
 
void SaveSettingsByFile (const String &FileName)
 Saves all settings that have their optional filename set to the specified file. More...
 
void SaveSettingsToXML (XML::Node &RootSettings, Boole SaveCurrent=true)
 Saves all the current setting groups as children of the provided XML node. More...
 
void SaveSettingsToXML (StringVector &GroupNames, XML::Node &RootSettings)
 Saves the named settings groups as children of the provided XML node. More...
 
void SetAutoGenFiles (Boole Enable)
 Enables or disables the automatic creation of settings files on initialization and destruction of this object. More...
 
void SetAutoGenPath (Boole Enable)
 Enables or disables the automatic creation of a directory path when saving. More...
 
void SetCurrentSettingsSaveFile (const String &FileName)
 Sets the name of the file that will have this object's "current" settings saved to. More...
 
void SetSettingsFilePath (const String &Path)
 Sets the path to be assumed when saving/loading settings to files. More...
 
- Public Member Functions inherited from Mezzanine::Singleton< GraphicsManager >
 ~Singleton ()
 Class destructor.
 

Static Public Attributes

static const String ImplementationName = "DefaultGraphicsManager"
 A String containing the name of this manager implementation.
 
static const ManagerBase::ManagerType InterfaceType = ManagerBase::MT_GraphicsManager
 A ManagerType enum value used to describe the type of interface/functionality this manager provides.
 

Protected Member Functions

virtual void AppendCurrentSettings (XML::Node &SettingsRootNode)
 Takes all the current settings of this handler and serializes them to an XML::Node. More...
 
virtual void ApplySettingGroupImpl (ObjectSettingGroup *Group)
 Applies all the settings stored by a ObjectSettingGroup. More...
 
void Construct ()
 Construct the manager and set sane defaults. More...
 
virtual String GetObjectRootNodeName () const
 Gets the name to be given to a Node with this handlers serialized data. More...
 
void InitOgreRenderSystem ()
 Initializes the internal graphics subsystem with the currently set configuration. More...
 
- Protected Member Functions inherited from Mezzanine::ObjectSettingsHandler
void LoadSettingSetFromXML (XML::Node &XMLNode, ObjectSettingSet *Set)
 Populates an ObjectSettingSet with settings stored in XML. More...
 
CountedPtr< SettingGroupVectorLoadSettingsFromFile (const String &FileName, const String &Path)
 Loads all ObjectSettingGroup instances serialized to a XML file into usable ObjectSettingGroup instances. More...
 
void SaveSettingSetToXML (XML::Node &XMLNode, ObjectSettingSet *Set)
 Saves an ObjectSettingSet to an XML node. More...
 
void SaveSettingsToFile (StringVector &GroupNames, const String &FileName, const String &Path)
 Saves a collection of ObjectSettingGroups stored by this handler to a file as XML. More...
 
- Protected Member Functions inherited from Mezzanine::Singleton< GraphicsManager >
 Singleton ()
 Class constructor.
 

Protected Attributes

Graphics::RenderSystem CurrRenderSys
 A RenderSystem enum value storing the RenderSystem type currently in use. More...
 
WindowSettings DesktopSettings
 A struct storing the dimensions of the desktop on the current hardware. More...
 
GameWindowContainer GameWindows
 A container storing all the game windows created by this manager. More...
 
Boole OgreBeenInitialized
 Stores whether the internal graphics subsystem has been initialized. More...
 
GameWindowPrimaryGameWindow
 A pointer to the hidden window storing the context and render resources. More...
 
RenderWorkUnitRenderWork
 The work unit that does all the rendering. More...
 
StringVector SupportedDevices
 A container of strings storing all the detected names of video devices on the current hardware. More...
 
ResolutionContainer SupportedResolutions
 A container of strings storing all the detected supported resolutions on the current hardware. More...
 
Threading::DefaultThreadSpecificStorage::TypeThreadResources
 Can be used for thread safe logging and other thread Specific resources. More...
 
- Protected Attributes inherited from Mezzanine::ManagerBase
Boole Initialized
 Simple Boole indicating whether or not this manager has been initialized. More...
 
EntresolTheEntresol
 The actual pointer to the Entresol core class. More...
 
- Protected Attributes inherited from Mezzanine::ObjectSettingsHandler
Boole AutoGenFiles
 Stores whether or not this handler will attempt to automatically generate a file if it doesn't exist. More...
 
Boole AutoGenPath
 Stores whether or not this handler will attempt to automatically generate a path to a file if it doesn't exist. More...
 
String CurrentSettingsSaveFile
 Stores the name of the file where the "Current" settings group will be saved to. More...
 
SettingFilesContainer SettingFiles
 A container storing all the file saving configuration used by this handler. More...
 
SettingGroupContainer SettingGroups
 A container storing all the SettingGroups owned by this handler. More...
 
String SettingsFilePath
 Stores the path to be used for file IO operations done by this handler. More...
 

Friends

class RenderWorkUnit
 The RenderWorkUnit really is an extension of the GraphicsManager, it just exists as a Functor for the sake of simplicity. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Mezzanine::ManagerBase
static String GetTypeAsString (const ManagerType &ManagerType)
 Gets the string form of the type of manager. More...
 
static ManagerType GetTypeFromString (const String &ManagerName)
 Gets the type of manager requested from a string. More...
 
- Static Public Member Functions inherited from Mezzanine::ObjectSettingsHandler
static String GetSerializableName ()
 Get the name of the the XML tag the class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Singleton< GraphicsManager >
static GraphicsManager * GetSingletonPtr ()
 Fetches a pointer to the singleton. More...
 
static Boole SingletonValid ()
 Checks to see if the singleton pointer is valid. More...
 
- Static Protected Attributes inherited from Mezzanine::Singleton< GraphicsManager >
static GraphicsManager * SingletonPtr
 The one and only pointer to the single object. More...
 

Detailed Description

This is intended to store basic graphics setting for the user.

This stores x/y resolution, fullscreen and in the future other settings. This is intended to make it easy for developers to pass/move around complex graphics settings. We hope to eventually include other items like shader settings, rendering API, and maybe other settings too.

Definition at line 119 of file graphicsmanager.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::GraphicsManager::GraphicsManager ( )

Basic constructor.

This creates a basic Graphics Settings with resolution 640x480 with fullscreen set to false.

Definition at line 124 of file graphicsmanager.cpp.

Mezzanine::Graphics::GraphicsManager::GraphicsManager ( const XML::Node XMLNode)

XML constructor.

Parameters
XMLNodeThe node of the xml document to construct from.
Todo:
This is currently necessary because a render window of some kind needs to exist for the loading of resources that occurs later in world construction (when this is constructed by the world, which this assumes. If possible this should be removed, to keep construction more flexible.

Definition at line 135 of file graphicsmanager.cpp.

Member Function Documentation

void Mezzanine::Graphics::GraphicsManager::AppendCurrentSettings ( XML::Node SettingsRootNode)
protectedvirtual

Takes all the current settings of this handler and serializes them to an XML::Node.

Parameters
CurrentNodeThe XML::Node to be populated with this handlers current settings.

Implements Mezzanine::ObjectSettingsHandler.

Definition at line 249 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::ApplySettingGroupImpl ( ObjectSettingGroup Group)
protectedvirtual

Applies all the settings stored by a ObjectSettingGroup.

Parameters
GroupThe ObjectSettingGroup to have all of it's settings applied.
Todo:
May want to make some other data member so that people can accurately get what is set now, instead of what will be set.

Implements Mezzanine::ObjectSettingsHandler.

Definition at line 261 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::Construct ( )
protected

Construct the manager and set sane defaults.

Definition at line 185 of file graphicsmanager.cpp.

GameWindow * Mezzanine::Graphics::GraphicsManager::CreateGameWindow ( const String WindowCaption,
const Whole Width,
const Whole Height,
const Whole Flags 
)

Creates a new game window to be rendered to.

Parameters
WindowCaptionThe caption to be set in the window titlebar.
WidthThe desired width in pixels.
HeightThe desired height in pixels.
FlagsAdditional misc parameters, see GameWindow class for more info.
Returns
Returns a pointer to the created window.

Definition at line 425 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::Deinitialize ( )
virtual

Removes this manager from any necessary configuration so it can be safely disposed of.

Todo:
Here is where we should be shutting down the rendersystem, but Ogre in it's poorly coded ways wasn't designed for that unless you are also deleting Ogre::Root. Take it up with them if you don't like it. (tell me where the thread is when you do, I'll join in) Related: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=77036&sid=a7ce7512032eb851d50da083795198f3

Implements Mezzanine::ManagerBase.

Definition at line 636 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::DestroyAllGameWindows ( Boole  ExcludePrimary = true)

Destroys every game window created.

Parameters
ExcludePrimaryWhether or not you want to spare the primary window created.

Definition at line 468 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::DestroyGameWindow ( GameWindow ToBeDestroyed)

Destroys a created game window by index.

Parameters
WindowIndexThe index of the window to be destroyed.

Definition at line 456 of file graphicsmanager.cpp.

Graphics::RenderSystem Mezzanine::Graphics::GraphicsManager::GetCurrRenderSystem ( )

Gets the current rendersystem being used.

Remarks
This does not return a pointer or any other kind of accessor to the actual rendersystem structure. If you need that, then we're doing something wrong.
Returns
Returns an enum value coresponding to the render system being used.

Definition at line 517 of file graphicsmanager.cpp.

const WindowSettings & Mezzanine::Graphics::GraphicsManager::GetDesktopSettings ( ) const

Gets the desktop display settings.

Parameters
Returnsa WindowSettings struct with the desktop display settings.

Definition at line 565 of file graphicsmanager.cpp.

GameWindow * Mezzanine::Graphics::GraphicsManager::GetGameWindow ( const Whole Index) const

Gets a game window by index.

Parameters
IndexThe index of the window to retrieve.
Returns
Returns a pointer to the game window at the specified index.

Definition at line 435 of file graphicsmanager.cpp.

GameWindow * Mezzanine::Graphics::GraphicsManager::GetGameWindow ( const String Caption) const

Gets a game window by it's caption text.

Note
If multiple windows have the same caption, the first one found will be returned.
Parameters
CaptionThe caption of the window to retrieve.
Returns
Returns a pointer to the game window with the specified caption, or NULL if no game windows with that caption exist.

Definition at line 440 of file graphicsmanager.cpp.

String Mezzanine::Graphics::GraphicsManager::GetImplementationTypeName ( ) const
virtual

This Allows any manager name to be sent to a stream. Primarily used for logging.

Returns
This returns a String that contains the name.

Implements Mezzanine::ManagerBase.

Definition at line 680 of file graphicsmanager.cpp.

ManagerBase::ManagerType Mezzanine::Graphics::GraphicsManager::GetInterfaceType ( ) const
virtual

This returns the type of this manager.

This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.

Returns
This returns a ManagerTypeName to identify what this can be safely cast to.

Implements Mezzanine::ManagerBase.

Definition at line 677 of file graphicsmanager.cpp.

Whole Mezzanine::Graphics::GraphicsManager::GetNumGameWindows ( ) const

Gets the number of game windows within this manager.

Returns
Returns a Whole representing the number of game windows within this manager.

Definition at line 451 of file graphicsmanager.cpp.

String Mezzanine::Graphics::GraphicsManager::GetObjectRootNodeName ( ) const
protectedvirtual

Gets the name to be given to a Node with this handlers serialized data.

Returns
Returns a String containing the name to be given to the XML::Node storing this handlers data.

Implements Mezzanine::ObjectSettingsHandler.

Definition at line 244 of file graphicsmanager.cpp.

GameWindow * Mezzanine::Graphics::GraphicsManager::GetPrimaryGameWindow ( )

Gets the primary(first) game window.

Returns
Returns a pointer to the primary game window.

Definition at line 480 of file graphicsmanager.cpp.

String Mezzanine::Graphics::GraphicsManager::GetRenderSystemName ( const Graphics::RenderSystem RenderSys)

Gets the name of the provided render system.

Parameters
RenderSysThe rendersystem to get the name of.
Returns
Returns a string containing the name of the provided render system.

Definition at line 522 of file graphicsmanager.cpp.

RenderWorkUnit * Mezzanine::Graphics::GraphicsManager::GetRenderWork ( )

Gets the work unit responsible for performing the graphics render of all scenes.

Returns
Returns a pointer to the RenderWorkUnit being used by this manager.

Definition at line 658 of file graphicsmanager.cpp.

String Mezzanine::Graphics::GraphicsManager::GetShortenedRenderSystemName ( const Graphics::RenderSystem RenderSys)

Gets a short hand name of the provided render system.

Parameters
RenderSysThe rendersystem to get the name of.
Returns
Returns a string containing the shortened name of the provided render system.

Definition at line 537 of file graphicsmanager.cpp.

const StringVector & Mezzanine::Graphics::GraphicsManager::GetSupportedDevices ( ) const

Gets a vector containing all the devices supported by this render system on the current hardware.

This vector is populated when the manager gets initialized. Calling on it before then will give you an empty vector.

Returns
Returns a Const Pointer to the vector storing all the supported devices.

Definition at line 560 of file graphicsmanager.cpp.

const GraphicsManager::ResolutionContainer & Mezzanine::Graphics::GraphicsManager::GetSupportedResolutions ( ) const

Gets a vector containing all the resolutions supported by this render system on the current hardware.

This vector is populated when the manager gets initialized. Calling on it before then will give you an empty vector.

Returns
Returns a Const Pointer to the vector storing all the supported resolutions.

Definition at line 555 of file graphicsmanager.cpp.

Boole Mezzanine::Graphics::GraphicsManager::HasOgreBeenInitialized ( )

Gets whether or not Ogre has been started.

Returns
Returns a Boole indicating whether or not Ogre has been initialized yet.

Definition at line 669 of file graphicsmanager.cpp.

Boole Mezzanine::Graphics::GraphicsManager::HasSDLBeenInitialized ( )

Gets whether or not SDL has been started.

Returns
Returns a Boole indicating whether or not SDL has been initialized yet.

Definition at line 664 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::Initialize ( )
virtual

Configures this manager for use prior to entering the main loop.

Added a GraphicWorkUnit to the WorkScheduler on the Entresol as a Monopoly, Initializes the Render device and rendering system if that has not already been done, if configured to will save all graphics configuration files.

Implements Mezzanine::ManagerBase.

Definition at line 599 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::InitOgreRenderSystem ( )
protected

Initializes the internal graphics subsystem with the currently set configuration.

Definition at line 223 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::SetRenderSystem ( const Graphics::RenderSystem RenderSys,
Boole  InitializeRenderSystem = false 
)

Sets the render system to be used.

Remarks
This will only work prior to a window being created/graphics manager being initialized. The internal structures to be built need to know what rendersystem to build for. Additionally this cannot be swapped/changed at runtime. If called after a window has been made this will throw an exception.
Parameters
RenderSysThe Render system to be used.
InitializeRenderSystemWhether to immediately initialize the rendersystem afterwords.

Definition at line 508 of file graphicsmanager.cpp.

void Mezzanine::Graphics::GraphicsManager::SwapAllBuffers ( Boole  WaitForVsync)
virtual

Swaps all the buffers of all GameWindows.

Parameters
WaitForVsyncWhether or not the buffer should swap after the vsync interval is completed.

Definition at line 593 of file graphicsmanager.cpp.

Friends And Related Function Documentation

friend class RenderWorkUnit
friend

The RenderWorkUnit really is an extension of the GraphicsManager, it just exists as a Functor for the sake of simplicity.

Definition at line 144 of file graphicsmanager.h.

Member Data Documentation

Graphics::RenderSystem Mezzanine::Graphics::GraphicsManager::CurrRenderSys
protected

A RenderSystem enum value storing the RenderSystem type currently in use.

Definition at line 170 of file graphicsmanager.h.

WindowSettings Mezzanine::Graphics::GraphicsManager::DesktopSettings
protected

A struct storing the dimensions of the desktop on the current hardware.

Definition at line 156 of file graphicsmanager.h.

GameWindowContainer Mezzanine::Graphics::GraphicsManager::GameWindows
protected

A container storing all the game windows created by this manager.

Definition at line 147 of file graphicsmanager.h.

Boole Mezzanine::Graphics::GraphicsManager::OgreBeenInitialized
protected

Stores whether the internal graphics subsystem has been initialized.

Definition at line 173 of file graphicsmanager.h.

GameWindow* Mezzanine::Graphics::GraphicsManager::PrimaryGameWindow
protected

A pointer to the hidden window storing the context and render resources.

Definition at line 159 of file graphicsmanager.h.

RenderWorkUnit* Mezzanine::Graphics::GraphicsManager::RenderWork
protected

The work unit that does all the rendering.

Definition at line 163 of file graphicsmanager.h.

StringVector Mezzanine::Graphics::GraphicsManager::SupportedDevices
protected

A container of strings storing all the detected names of video devices on the current hardware.

Definition at line 153 of file graphicsmanager.h.

ResolutionContainer Mezzanine::Graphics::GraphicsManager::SupportedResolutions
protected

A container of strings storing all the detected supported resolutions on the current hardware.

Definition at line 150 of file graphicsmanager.h.

Threading::DefaultThreadSpecificStorage::Type* Mezzanine::Graphics::GraphicsManager::ThreadResources
protected

Can be used for thread safe logging and other thread Specific resources.

Definition at line 166 of file graphicsmanager.h.


The documentation for this class was generated from the following files: