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:
DavidWyand-GG 2013-04-09 12:50:17 -04:00
parent 1ed1a41256
commit 0d77cdc270
18 changed files with 282 additions and 45 deletions

View file

@ -71,6 +71,25 @@ public:
/// @return The current desktop bit depth, or Point2I(-1,-1) if an error occurred
virtual Point2I getDesktopResolution() = 0;
// Build out the monitor list.
virtual void buildMonitorsList() {}
// Find the first monitor index that matches the given name. The actual match
// algorithm depends on the implementation. Provides a default value of -1 to
// indicate no match.
virtual S32 findFirstMatchingMonitor(const char* name) { return -1; }
// Retrieve the number of monitors. Provides a default count of 0 for systems that
// don't provide information on connected monitors.
virtual U32 getMonitorCount() { return 0; }
// Get the name of the requested monitor. Provides a default of "" for platorms
// that do not provide information on connected monitors.
virtual const char* getMonitorName(U32 index) { return ""; }
// Get the requested monitor's rectangular region.
virtual RectI getMonitorRect(U32 index) { return RectI(0, 0, 0, 0); }
/// Populate a vector with all monitors and their extents in window space.
virtual void getMonitorRegions(Vector<RectI> &regions) = 0;