// Generated API outline. Implementation bodies omitted.
#nullable enable
namespace Xui.GPU.Hardware.Metal
{
using NativeMetal = global::Xui.Runtime.IOS.Metal;
using System;
///
/// Apple Metal hardware GPU device implementation.
/// Provides hardware-accelerated shader compilation and rendering on macOS and iOS.
///
///
/// This backend uses the Metal framework for rendering and the Metal shader compiler
/// for MSL shader compilation. Supports offscreen readback targets and native MTKView presentation targets.
///
public sealed partial class IOSGpuDevice : IGpuResourceDevice
{
/// Gets the name of this GPU backend (e.g., "D3D11", "Metal").
public string BackendName { get; }
/// Gets whether this device has been disposed.
public bool IsDisposed { get; }
///
/// Creates a new Metal GPU device using the system default device.
///
/// Thrown if no Metal device is available.
public IOSGpuDevice();
///
/// Compiles a vertex shader from native shader source code.
///
/// The shader source (HLSL for D3D11, MSL for Metal).
/// The name of the entry point function.
/// A compiled vertex shader.
public IGpuVertexShader CompileVertexShader(string source, string entryPoint);
///
/// Compiles a fragment (pixel) shader from native shader source code.
///
/// The shader source (HLSL for D3D11, MSL for Metal).
/// The name of the entry point function.
/// A compiled fragment shader.
public IGpuFragmentShader CompileFragmentShader(string source, string entryPoint);
///
/// Creates a render target texture.
///
/// Width in pixels.
/// Height in pixels.
/// A render target that can be used with a command list.
public IGpuRenderTarget CreateRenderTarget(int width, int height);
///
/// Creates a command list for recording rendering commands.
///
public IGpuCommandList CreateCommandList();
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose();
}
}
namespace Xui.GPU.Hardware.Metal
{
using NativeMetal = global::Xui.Runtime.IOS.Metal;
using System.Collections.Generic;
using System;
using Xui.GPU.Shaders.Types;
///
/// Apple Metal hardware GPU device implementation.
/// Provides hardware-accelerated shader compilation and rendering on macOS and iOS.
///
///
/// This backend uses the Metal framework for rendering and the Metal shader compiler
/// for MSL shader compilation. Supports offscreen readback targets and native MTKView presentation targets.
///
public sealed partial class IOSGpuDevice
{
/// Uploads premultiplied RGBA8 mip levels, largest first, with tightly packed rows.
public unsafe IGpuTexture CreateSampledTexture(int width, int height, IReadOnlyList mipLevels);
/// Uploads immutable vertices once. The caller owns the returned buffer.
public unsafe IGpuVertexBuffer CreateVertexBuffer(ReadOnlySpan vertices, int stride);
}
}