mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-06 22:00:33 +00:00
Merge pull request #518 from yas-online/fix-angle-mobile
Fix AngleWindowInfo compile errors on mobile introduced by #458
This commit is contained in:
commit
fa449fc8aa
|
@ -27,6 +27,7 @@ using Android.Views;
|
||||||
using Android.Runtime;
|
using Android.Runtime;
|
||||||
using Android.Graphics;
|
using Android.Graphics;
|
||||||
using OpenTK.Platform.Egl;
|
using OpenTK.Platform.Egl;
|
||||||
|
using SurfaceType = Android.Views.SurfaceType;
|
||||||
|
|
||||||
namespace OpenTK.Platform.Android
|
namespace OpenTK.Platform.Android
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,8 +155,10 @@ namespace OpenTK.Platform.Egl
|
||||||
{
|
{
|
||||||
if (window is EglWindowInfo)
|
if (window is EglWindowInfo)
|
||||||
WindowInfo = (EglWindowInfo) window;
|
WindowInfo = (EglWindowInfo) window;
|
||||||
|
#if !ANDROID
|
||||||
else if (window is IAngleWindowInfoInternal)
|
else if (window is IAngleWindowInfoInternal)
|
||||||
WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo;
|
WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext))
|
if (!Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext))
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using OpenTK.Platform.Egl;
|
|
||||||
|
|
||||||
namespace OpenTK.Platform
|
namespace OpenTK.Platform
|
||||||
{
|
{
|
||||||
|
@ -103,7 +102,12 @@ namespace OpenTK.Platform
|
||||||
else if (Configuration.RunningOnAndroid) Embedded = new Android.AndroidFactory();
|
else if (Configuration.RunningOnAndroid) Embedded = new Android.AndroidFactory();
|
||||||
#endif
|
#endif
|
||||||
else Embedded = new UnsupportedPlatform();
|
else Embedded = new UnsupportedPlatform();
|
||||||
Angle = new EglAnglePlatformFactory(Embedded);
|
|
||||||
|
#if ANDROID
|
||||||
|
Angle = new UnsupportedPlatform();
|
||||||
|
#else
|
||||||
|
Angle = new Egl.EglAnglePlatformFactory(Embedded);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
|
|
|
@ -13,7 +13,6 @@ using System.Runtime.InteropServices;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using OpenTK.Platform.Egl;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -396,6 +395,7 @@ namespace OpenTK.Platform
|
||||||
|
|
||||||
#region
|
#region
|
||||||
|
|
||||||
|
#if !__MOBILE__
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an IWindowInfo instance for Angle rendering, based on
|
/// Creates an IWindowInfo instance for Angle rendering, based on
|
||||||
/// supplied platform window (e.g. a window created with
|
/// supplied platform window (e.g. a window created with
|
||||||
|
@ -403,11 +403,12 @@ namespace OpenTK.Platform
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="platformWindow"></param>
|
/// <param name="platformWindow"></param>
|
||||||
/// <returns></returns>
|
/// <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
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue