fix AngleWindowInfo compile errors on mobile introduced by #458

This commit is contained in:
Neico 2017-04-29 21:33:33 +02:00
parent 5acdf69aa8
commit 974e02b03e
4 changed files with 14 additions and 6 deletions

View file

@ -27,6 +27,7 @@ using Android.Views;
using Android.Runtime;
using Android.Graphics;
using OpenTK.Platform.Egl;
using SurfaceType = Android.Views.SurfaceType;
namespace OpenTK.Platform.Android
{

View file

@ -155,8 +155,10 @@ namespace OpenTK.Platform.Egl
{
if (window is EglWindowInfo)
WindowInfo = (EglWindowInfo) window;
#if !ANDROID
else if (window is IAngleWindowInfoInternal)
WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo;
#endif
if (!Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext))
{

View file

@ -27,7 +27,6 @@
using System;
using System.Diagnostics;
using OpenTK.Platform.Egl;
namespace OpenTK.Platform
{
@ -103,7 +102,12 @@ namespace OpenTK.Platform
else if (Configuration.RunningOnAndroid) Embedded = new Android.AndroidFactory();
#endif
else Embedded = new UnsupportedPlatform();
Angle = new EglAnglePlatformFactory(Embedded);
#if ANDROID
Angle = new UnsupportedPlatform();
#else
Angle = new Egl.EglAnglePlatformFactory(Embedded);
#endif
}
#endif
else

View file

@ -13,7 +13,6 @@ using System.Runtime.InteropServices;
using System.Reflection;
using System.Diagnostics;
using OpenTK.Graphics;
using OpenTK.Platform.Egl;
#endregion
@ -396,6 +395,7 @@ namespace OpenTK.Platform
#region
#if !__MOBILE__
/// <summary>
/// Creates an IWindowInfo instance for Angle rendering, based on
/// supplied platform window (e.g. a window created with
@ -403,10 +403,11 @@ namespace OpenTK.Platform
/// </summary>
/// <param name="platformWindow"></param>
/// <returns></returns>
public static IAngleWindowInfo CreateAngleWindowInfo(IWindowInfo platformWindow)
public static Egl.IAngleWindowInfo CreateAngleWindowInfo(IWindowInfo platformWindow)
{
return new AngleWindowInfo(platformWindow);
return new Egl.AngleWindowInfo(platformWindow);
}
#endif
#endregion