Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
GamePlatformOpenTK.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 #if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP && SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGL
4 using System;
5 using System.Collections.Generic;
6 using System.IO;
7 using System.Reflection;
8 using SiliconStudio.Paradox.Graphics;
9 
10 namespace SiliconStudio.Paradox.Games
11 {
12  internal class GamePlatformOpenTK : GamePlatform, IGraphicsDeviceFactory
13  {
14  public GamePlatformOpenTK(GameBase game) : base(game)
15  {
16  }
17 
18  public override string DefaultAppDirectory
19  {
20  get
21  {
22  var assemblyUri = new Uri(Assembly.GetEntryAssembly().CodeBase);
23  return Path.GetDirectoryName(assemblyUri.LocalPath);
24  }
25  }
26 
27  internal override GameWindow[] GetSupportedGameWindows()
28  {
29  return new GameWindow[] { new GameWindowOpenTK() };
30  }
31 
32  public virtual void DeviceChanged(GraphicsDevice currentDevice, GraphicsDeviceInformation deviceInformation)
33  {
34  // TODO: Check when it needs to be disabled on iOS (OpenGL)?
35  // Force to resize the gameWindow
36  //gameWindow.Resize(deviceInformation.PresentationParameters.BackBufferWidth, deviceInformation.PresentationParameters.BackBufferHeight);
37  }
38  }
39 }
40 #endif
Android.Net.Uri Uri
Definition: HtmlElement.cs:8