GFXInit
Interface for tracking GFX adapters and initializing them into devices.
Public Types
Signal< void(Vector< GFXAdapter * > &)>
RegisterDeviceSignal
Allows device to register themselves as available.
Private Static Attributes
Vector< GFXAdapter * >
List of known adapters.
Private Functions
Public Static Functions
chooseAdapter(GFXAdapterType type, const char * outputDevice)
Chooses a suitable GFXAdapter, based on type, preferences, and fallbacks.
bool
compareAdapterOutputDevice(const GFXAdapter * adapter, const char * outputDevice)
Compares the adapter's output display device with the given output display device.
createDevice(GFXAdapter * adapter)
Creates a GFXDevice based on an adapter from the enumerateAdapters method.
Enumerate all the graphics adapters on the system.
Get the number of available adapters.
const char *
Converts a GFXAdapterType to a string name. Useful for writing out prefs.
getAdapterOfType(GFXAdapterType type, const char * outputDevice)
Gets the first adapter of the requested type (and on the requested output device) from the list of enumerated adapters.
getAdapters(Vector< GFXAdapter * > * adapters)
Get the enumerated adapters.
getAdapterTypeFromName(const char * name)
Converts a string to a GFXAdapterType. Useful for reading in prefs.
Based on user preferences (or in the absence of a valid user selection, a heuristic), return a "best" adapter.
Returns a GFXVideoMode that describes the current state of the main monitor.
Get the initial video mode based on user preferences (or a heuristic).
Detailed Description
Interface for tracking GFX adapters and initializing them into devices.
note:Implement this class per platform.
note:This is just a class so it can be friends with GFXDevice)
Public Types
typedef Signal< void(Vector< GFXAdapter * > &)> RegisterDeviceSignal
Allows device to register themselves as available.
Private Static Attributes
Vector< GFXAdapter * > smAdapters
List of known adapters.
RegisterDeviceSignal * smRegisterDeviceSignal
Private Functions
DECLARE_STATIC_CLASS(GFXInit )
Public Static Functions
chooseAdapter(GFXAdapterType type, const char * outputDevice)
Chooses a suitable GFXAdapter, based on type, preferences, and fallbacks.
If the requested type is omitted, we use the prefs value. If the requested type isn't found, we use fallbacks: OpenGL, NullDevice This method never returns NULL.
cleanup()
Cleans out the adapter list.
compareAdapterOutputDevice(const GFXAdapter * adapter, const char * outputDevice)
Compares the adapter's output display device with the given output display device.
createDevice(GFXAdapter * adapter)
Creates a GFXDevice based on an adapter from the enumerateAdapters method.
Parameters:
| adapter | Graphics adapter to create device |
enumerateAdapters()
Enumerate all the graphics adapters on the system.
getAdapterCount()
Get the number of available adapters.
getAdapterNameFromType(GFXAdapterType type)
Converts a GFXAdapterType to a string name. Useful for writing out prefs.
getAdapterOfType(GFXAdapterType type, const char * outputDevice)
Gets the first adapter of the requested type (and on the requested output device) from the list of enumerated adapters.
Should only call this after a call to enumerateAdapters.
getAdapters(Vector< GFXAdapter * > * adapters)
Get the enumerated adapters.
Should only call this after a call to enumerateAdapters.
getAdapterTypeFromName(const char * name)
Converts a string to a GFXAdapterType. Useful for reading in prefs.
getBestAdapterChoice()
Based on user preferences (or in the absence of a valid user selection, a heuristic), return a "best" adapter.
getDesktopResolution()
Returns a GFXVideoMode that describes the current state of the main monitor.
This should probably move to the abstract window manager
getInitialVideoMode()
Get the initial video mode based on user preferences (or a heuristic).
getRegisterDeviceSignal()
init()
Prepares the adapter list.
