Table of Contents

Interface IGpuDevice

Namespace
Xui.GPU.Hardware
Assembly
Xui.Core.dll

Abstract interface for a GPU hardware device. Implementations exist for Direct3D 11 (Windows) and Metal (macOS/iOS).

public interface IGpuDevice : IDisposable
Inherited Members

Properties

BackendName

Gets the name of this GPU backend (e.g., "D3D11", "Metal").

string BackendName { get; }

Property Value

string

IsDisposed

Gets whether this device has been disposed.

bool IsDisposed { get; }

Property Value

bool

Methods

CompileFragmentShader(string, string)

Compiles a fragment (pixel) shader from native shader source code.

IGpuFragmentShader CompileFragmentShader(string source, string entryPoint)

Parameters

source string

The shader source (HLSL for D3D11, MSL for Metal).

entryPoint string

The name of the entry point function.

Returns

IGpuFragmentShader

A compiled fragment shader.

CompileVertexShader(string, string)

Compiles a vertex shader from native shader source code.

IGpuVertexShader CompileVertexShader(string source, string entryPoint)

Parameters

source string

The shader source (HLSL for D3D11, MSL for Metal).

entryPoint string

The name of the entry point function.

Returns

IGpuVertexShader

A compiled vertex shader.

CreateCommandList()

Creates a command list for recording rendering commands.

IGpuCommandList CreateCommandList()

Returns

IGpuCommandList

CreateRenderTarget(int, int)

Creates a render target texture.

IGpuRenderTarget CreateRenderTarget(int width, int height)

Parameters

width int

Width in pixels.

height int

Height in pixels.

Returns

IGpuRenderTarget

A render target that can be used with a command list.