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

@ -47,6 +47,10 @@ public:
char mName[MaxAdapterNameLen];
/// The name of the display output device for the adapter, if any.
/// For example under Windows, this could be: \\.\DISPLAY1
char mOutputName[MaxAdapterNameLen];
/// List of available full-screen modes. Windows can be any size,
/// so we do not enumerate them here.
Vector<GFXVideoMode> mAvailableModes;
@ -55,6 +59,7 @@ public:
F32 mShaderModel;
const char * getName() const { return mName; }
const char * getOutputName() const { return mOutputName; }
GFXAdapterType mType;
U32 mIndex;
CreateDeviceInstanceDelegate mCreateDeviceInstanceDelegate;
@ -64,6 +69,7 @@ public:
VECTOR_SET_ASSOCIATION( mAvailableModes );
mName[0] = 0;
mOutputName[0] = 0;
mShaderModel = 0.f;
mIndex = 0;
}