3 #if SILICONSTUDIO_PLATFORM_IOS
5 using System.Collections.Generic;
7 using System.Reflection;
8 using SiliconStudio.Paradox.Graphics;
10 namespace SiliconStudio.
Paradox.Games
12 internal class GamePlatformiOS : GamePlatform, IGraphicsDeviceFactory
14 public GamePlatformiOS(GameBase game) : base(game)
18 public override string DefaultAppDirectory
22 var assemblyUri =
new Uri(Assembly.GetEntryAssembly().CodeBase);
23 return Path.GetDirectoryName(assemblyUri.LocalPath);
27 internal override GameWindow[] GetSupportedGameWindows()
29 return new GameWindow[] {
new GameWindowiOS() };
32 public override List<GraphicsDeviceInformation> FindBestDevices(GameGraphicsParameters preferredParameters)
34 var gameWindowiOS = gameWindow as GameWindowiOS;
35 if (gameWindowiOS != null)
39 var deviceInfo =
new GraphicsDeviceInformation
41 Adapter = GraphicsAdapterFactory.Default,
43 PresentationParameters =
new PresentationParameters(gameWindowiOS.ClientBounds.Width,
44 gameWindowiOS.ClientBounds.Height,
45 gameWindowiOS.NativeWindow)
47 DepthStencilFormat = PixelFormat.D16_UNorm,
51 return new List<GraphicsDeviceInformation>() { deviceInfo };
53 return base.FindBestDevices(preferredParameters);
56 public override void DeviceChanged(GraphicsDevice currentDevice, GraphicsDeviceInformation deviceInformation)
GraphicsProfile
Identifies the set of supported devices for the demo based on device capabilities.