Om
1.0.0
A universal framework for multimedia simulation
|
A class that enumerates the available graphics devices for this system. More...
#include <omGraphicsDeviceManager.h>
Public Member Functions | |
GraphicsDeviceManager () | |
Create a new graphics device manager which inspects the available system graphics devices. More... | |
virtual | ~GraphicsDeviceManager () |
Destroy this graphics device manager and release all associated resources. More... | |
Size | getDeviceCount () const |
Return the total number of graphics devices that this manager is aware of. More... | |
Shared< GraphicsDevice > | getDevice (Index deviceIndex) const |
Return a pointer to the graphics device at the specified index in the device manager. More... | |
Shared< GraphicsDevice > | getDefaultDevice () const |
Return a pointer to the default graphics device for this system. More... | |
Shared< GraphicsDevice > | getDeviceWithType (const GraphicsDeviceType &newType) const |
Return a pointer to the graphics device on this system with the specified device type. More... | |
virtual Bool | registerDevice (const Shared< GraphicsDevice > &newDevice) |
Register the specified graphics device pointer with this device manager. More... | |
Protected Member Functions | |
virtual void | detectDevices () |
Detect the devices that are available on this system and add them to the device list. More... | |
A class that enumerates the available graphics devices for this system.
This allows the user to pick an arbitrary GraphicsDevice and use it for rendering. For instance, the device manager might support 2 devices: one for OpenGL and another for Direct3D. The user can pick a device at run time and use it.
om::graphics::devices::GraphicsDeviceManager::GraphicsDeviceManager | ( | ) |
Create a new graphics device manager which inspects the available system graphics devices.
|
virtual |
Destroy this graphics device manager and release all associated resources.
Size om::graphics::devices::GraphicsDeviceManager::getDeviceCount | ( | ) | const |
Return the total number of graphics devices that this manager is aware of.
Shared<GraphicsDevice> om::graphics::devices::GraphicsDeviceManager::getDevice | ( | Index | deviceIndex | ) | const |
Return a pointer to the graphics device at the specified index in the device manager.
If an invalid device index is specified, a NULL pointer is returned.
Shared<GraphicsDevice> om::graphics::devices::GraphicsDeviceManager::getDefaultDevice | ( | ) | const |
Return a pointer to the default graphics device for this system.
If there are no devices present which could be the default, a NULL pointer is returned.
Shared<GraphicsDevice> om::graphics::devices::GraphicsDeviceManager::getDeviceWithType | ( | const GraphicsDeviceType & | newType | ) | const |
Return a pointer to the graphics device on this system with the specified device type.
If there are no devices present with that device type, a NULL pointer is returned.
|
virtual |
Register the specified graphics device pointer with this device manager.
This allows the user to make the manager aware of new types of devices that it might not be aware of. The method returns whether or not the specified device was able to be registered. The method can fail if the new device pointer is NULL.
|
protectedvirtual |
Detect the devices that are available on this system and add them to the device list.