mono/MonoGame — pull request #2372 by nkast (2014-04-17 19:33:11+00:00)
Title: Changes to GraphicsProfile

Some changes to GraphicsProfile. Need testing on other platforms...
*GraphicsDeviceManager.cs*
-GraphicsProfile is initialized with the highest possible value by calling the new static method GraphicsDevice.GetHighestSupportedGraphicsProfile(null);
-[WP8] _graphicsDevice.GraphicsProfile is now updated inside GraphicsDeviceManager.ApplyChanges(...) after deviceCreation like the rest DirectX platforms.

*GraphicsDevice.cs*
-GraphicsProfile is now read only. The correct way to set the profile is:
1) set graphics.GraphicsProfile inside the Game.actor()
3) change it on GraphicsDeviceManager.PreparingDeviceSettings event
2) set graphics.GraphicsProfile and call graphics.ApplyChanges() after initialization
-Add static GetHighestSupportedGraphicsProfile(GraphicsDevice device) method.
For DirectX this will return the highest supported Profile based on the device FeatureLevel. When device is null it will query the (slower?) SharpDX.Direct3D11.Device.GetSupportedFeatureLevel().
For all other platforms it will return HiDef, which was the current default. Hopefully this will not cause any problems.
-When set GraphicsProfile (internally) it will check if it is supported by the device and throw an Exception on error.

*GraphicsDevice.DirectX.cs*
-Remove code that set the GraphicsProfile after device creation based on the FeatureLevel.

*GraphicsProfile.cs*
Assign values to the enum so it's easier to compare different levels. Also a propose of extending GraphicsProfile with other FeatureLevels.