mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 20:35:35 +00:00
GFX now handles non-default adapters
The GFX (DirectX) pipeline did not respect the choice of adapter and always went for the default one. Normally this isn't an issue unless you wish to target a particular adapter and display device combination. This has been corrected. The GFX initialize functions now attempt to find the best adapter that matches a given display device (i.e. monitor) if one has been passed in. To aid with choosing a display device some new monitor enumeration methods have been added to the platform window manager. These methods have been exposed to the Canvas.
This commit is contained in:
parent
1ed1a41256
commit
0d77cdc270
18 changed files with 282 additions and 45 deletions
|
|
@ -65,15 +65,19 @@ public:
|
|||
/// Get the number of available adapters.
|
||||
static S32 getAdapterCount();
|
||||
|
||||
/// Compares the adapter's output display device with the given output display device
|
||||
static bool compareAdapterOutputDevice(const GFXAdapter* adapter, 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.
|
||||
static GFXAdapter *chooseAdapter( GFXAdapterType type);
|
||||
static GFXAdapter *chooseAdapter( GFXAdapterType type, const char* outputDevice);
|
||||
|
||||
/// Gets the first adapter of the requested type from the list of enumerated
|
||||
/// adapters. Should only call this after a call to enumerateAdapters.
|
||||
static GFXAdapter *getAdapterOfType( GFXAdapterType type );
|
||||
/// 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.
|
||||
static GFXAdapter *getAdapterOfType( GFXAdapterType type, const char* outputDevice );
|
||||
|
||||
/// Converts a GFXAdapterType to a string name. Useful for writing out prefs
|
||||
static const char *getAdapterNameFromType( GFXAdapterType type );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue