2024-08-31 21:42:56 +01:00
|
|
|
using Ryujinx.Graphics.GAL;
|
|
|
|
using System;
|
2023-07-28 03:54:24 +01:00
|
|
|
using System.Runtime.Versioning;
|
2024-08-31 21:42:56 +01:00
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Metal
|
|
|
|
{
|
2023-07-28 03:54:24 +01:00
|
|
|
[SupportedOSPlatform("macos")]
|
2024-08-31 21:42:56 +01:00
|
|
|
public class Window : IWindow, IDisposable
|
|
|
|
{
|
2023-07-28 03:54:24 +01:00
|
|
|
private readonly MetalRenderer _renderer;
|
2024-08-31 21:42:56 +01:00
|
|
|
|
2023-07-28 03:54:24 +01:00
|
|
|
public Window(MetalRenderer renderer)
|
2024-08-31 21:42:56 +01:00
|
|
|
{
|
2023-07-28 03:54:24 +01:00
|
|
|
_renderer = renderer;
|
2024-08-31 21:42:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void Present(ITexture texture, ImageCrop crop, Action swapBuffersCallback)
|
|
|
|
{
|
2023-07-28 03:54:24 +01:00
|
|
|
if (_renderer.Pipeline is Pipeline pipeline)
|
|
|
|
{
|
|
|
|
pipeline.Present();
|
|
|
|
}
|
2024-08-31 21:42:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void SetSize(int width, int height)
|
|
|
|
{
|
|
|
|
// Not needed as we can get the size from the surface.
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ChangeVSyncMode(bool vsyncEnabled)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void SetAntiAliasing(AntiAliasing antialiasing)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void SetScalingFilter(ScalingFilter type)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void SetScalingFilterLevel(float level)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2023-07-28 03:54:24 +01:00
|
|
|
}
|