This is intended to store basic graphics setting for the user. More...
#include <graphicsmanager.h>
Public Member Functions | |
| GraphicsManager () | |
| Basic constructor. | |
| GraphicsManager (const Whole &Width, const Whole &Height, const bool &FullScreen) | |
| Versatile Constructor. | |
| ~GraphicsManager () | |
| Class Destructor. | |
| GameWindow * | CreateGameWindow (const String &WindowCaption, const Whole &Width, const Whole &Height, const Whole &Flags) |
| Creates a new game window to be rendered to. | |
| void | DestroyAllGameWindows (bool ExcludePrimary=true) |
| Destroys every game window created. | |
| void | DestroyGameWindow (GameWindow *ToBeDestroyed) |
| Destroys a created game window by index. | |
| virtual void | DoMainLoopItems () |
| This is where the rendering takes place. | |
| Mezzanine::RenderSystem | GetCurrRenderSystem () |
| Gets the current rendersystem being used. | |
| const GraphicsSettings & | GetDefaultSettings () |
| Gets the default settings for windows this manager initialized with. | |
| const GraphicsSettings & | GetDesktopSettings () |
| Gets the desktop display settings. | |
| GameWindow * | GetGameWindow (const Whole &Index) |
| Gets a game window by index. | |
| Whole | GetNumGameWindows () |
| Gets the number of game windows within this manager. | |
| GameWindow * | GetPrimaryGameWindow () |
| Gets the primary(first) game window. | |
| String | GetRenderSystemName () |
| Gets the name of the render system in current use. | |
| const std::vector< String > * | GetSupportedDevices () |
| Gets a vector containing all the devices supported by this render system on the current hardware. | |
| const std::vector< String > * | GetSupportedResolutions () |
| Gets a vector containing all the resolutions supported by this render system on the current hardware. | |
| virtual ManagerTypeName | GetType () const |
| This returns the type of this manager. | |
| bool | HasOgreBeenInitialized () |
| Gets whether or not Ogre has been started. | |
| bool | HasSDLBeenInitialized () |
| Gets whether or not SDL has been started. | |
| virtual void | Initialize () |
| Empty Initializor. | |
| virtual bool | PostMainLoopItems () |
| This is derived from and uses the ManagerBase to perform the the post main loop callbacks. | |
| virtual void | RenderOneFrame () |
| Renders one frame of the scene. | |
| virtual void | ResetRenderTimer () |
| Resets the Render timer. | |
| void | SetRenderSystem (const Mezzanine::RenderSystem &RenderSys) |
| Sets the render system to be used. | |
| virtual void | SwapAllBuffers (bool WaitForVsync) |
| Swaps all the buffers of all GameWindows. | |
Static Public Member Functions | |
| static void | InitSDL () |
| SDL is used for use input, and must be initialized prior to use. | |
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 76 of file graphicsmanager.h.
| Mezzanine::GraphicsManager::GraphicsManager | ( | ) |
Basic constructor.
This creates a basic Graphics Settings with resolution 640x480 with fullscreen set to false
Definition at line 71 of file graphicsmanager.cpp.
| Mezzanine::GraphicsManager::GraphicsManager | ( | const Whole & | Width, |
| const Whole & | Height, | ||
| const bool & | FullScreen | ||
| ) |
Versatile Constructor.
| Width | The desired width. |
| Height | The desired height. |
| FullScreen | True if fullscreen, false if not. |
This creates a Graphics Settings with resolution and fullscreen passed into to it that will be used when creating the primary window if one isn't already created when this manager in initialized. Be careful that the settings selected are appropriate. Many mobile devices do not support windows, and many screens do not support arbitrary resolutions in fullscreen mode.
Definition at line 78 of file graphicsmanager.cpp.
| GameWindow * Mezzanine::GraphicsManager::CreateGameWindow | ( | const String & | WindowCaption, |
| const Whole & | Width, | ||
| const Whole & | Height, | ||
| const Whole & | Flags | ||
| ) |
Creates a new game window to be rendered to.
| WindowCaption | The caption to be set in the window titlebar. |
| Width | The desired width in pixels. |
| Height | The desired height in pixels. |
| Flags | Additional misc parameters, see GameWindow class for more info. |
Definition at line 192 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::DestroyAllGameWindows | ( | bool | ExcludePrimary = true | ) |
Destroys every game window created.
| ExcludePrimary | Whether or not you want to spare the primary window created. |
Definition at line 231 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::DestroyGameWindow | ( | GameWindow * | ToBeDestroyed | ) |
Destroys a created game window by index.
| WindowIndex | The index of the window to be destroyed. |
Definition at line 218 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::DoMainLoopItems | ( | ) | [virtual] |
This is where the rendering takes place.
This does the rendering for the game using all the actors in the actormanager.
Implements Mezzanine::ManagerBase.
Definition at line 356 of file graphicsmanager.cpp.
| Mezzanine::RenderSystem Mezzanine::GraphicsManager::GetCurrRenderSystem | ( | ) |
Gets the current rendersystem being used.
Definition at line 275 of file graphicsmanager.cpp.
| const GraphicsSettings & Mezzanine::GraphicsManager::GetDefaultSettings | ( | ) |
Gets the default settings for windows this manager initialized with.
| Returns | a GraphicsSettings struct with the default display settings. |
Definition at line 254 of file graphicsmanager.cpp.
| const GraphicsSettings & Mezzanine::GraphicsManager::GetDesktopSettings | ( | ) |
Gets the desktop display settings.
| Returns | a GraphicsSettings struct with the desktop display settings. |
Definition at line 249 of file graphicsmanager.cpp.
| GameWindow * Mezzanine::GraphicsManager::GetGameWindow | ( | const Whole & | Index | ) |
Gets a game window by index.
Definition at line 208 of file graphicsmanager.cpp.
| Whole Mezzanine::GraphicsManager::GetNumGameWindows | ( | ) |
Gets the number of game windows within this manager.
Definition at line 213 of file graphicsmanager.cpp.
| GameWindow * Mezzanine::GraphicsManager::GetPrimaryGameWindow | ( | ) |
Gets the primary(first) game window.
Definition at line 244 of file graphicsmanager.cpp.
| String Mezzanine::GraphicsManager::GetRenderSystemName | ( | ) |
Gets the name of the render system in current use.
Definition at line 280 of file graphicsmanager.cpp.
| const std::vector< String > * Mezzanine::GraphicsManager::GetSupportedDevices | ( | ) |
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.
Definition at line 293 of file graphicsmanager.cpp.
| const std::vector< String > * Mezzanine::GraphicsManager::GetSupportedResolutions | ( | ) |
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.
Definition at line 288 of file graphicsmanager.cpp.
| ManagerBase::ManagerTypeName Mezzanine::GraphicsManager::GetType | ( | ) | const [virtual] |
This returns the type of this manager.
Implements Mezzanine::ManagerBase.
Definition at line 378 of file graphicsmanager.cpp.
| bool Mezzanine::GraphicsManager::HasOgreBeenInitialized | ( | ) |
Gets whether or not Ogre has been started.
Definition at line 264 of file graphicsmanager.cpp.
| bool Mezzanine::GraphicsManager::HasSDLBeenInitialized | ( | ) |
Gets whether or not SDL has been started.
Definition at line 259 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::Initialize | ( | ) | [virtual] |
Empty Initializor.
This specific initializor is unneeded, but we implement it for compatibility. It also exists in case a derived class wants to override it for some reason
Implements Mezzanine::ManagerBase.
Definition at line 324 of file graphicsmanager.cpp.
| bool Mezzanine::GraphicsManager::PostMainLoopItems | ( | ) | [virtual] |
This is derived from and uses the ManagerBase to perform the the post main loop callbacks.
Reimplemented from Mezzanine::ManagerBase.
Definition at line 381 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::ResetRenderTimer | ( | ) | [virtual] |
Resets the Render timer.
This function should not be called unless you know exactly what you are doing. This will reset the timer keeping track of game frame times, and thus can disrupt functionality of the mainloop.
Definition at line 298 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::SetRenderSystem | ( | const Mezzanine::RenderSystem & | RenderSys | ) |
Sets the render system to be used.
| RenderSys | The Render system to be used. |
Definition at line 269 of file graphicsmanager.cpp.
| void Mezzanine::GraphicsManager::SwapAllBuffers | ( | bool | WaitForVsync | ) | [virtual] |
Swaps all the buffers of all GameWindows.
| WaitForVsync | Whether or not the buffer should swap after the vsync interval is completed. |
Definition at line 317 of file graphicsmanager.cpp.
1.7.3