Interface IGpuDevice
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
IsDisposed
Gets whether this device has been disposed.
bool IsDisposed { get; }
Property Value
Methods
CompileFragmentShader(string, string)
Compiles a fragment (pixel) shader from native shader source code.
IGpuFragmentShader CompileFragmentShader(string source, string entryPoint)
Parameters
sourcestringThe shader source (HLSL for D3D11, MSL for Metal).
entryPointstringThe 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
sourcestringThe shader source (HLSL for D3D11, MSL for Metal).
entryPointstringThe name of the entry point function.
Returns
- IGpuVertexShader
A compiled vertex shader.
CreateCommandList()
Creates a command list for recording rendering commands.
IGpuCommandList CreateCommandList()
Returns
CreateRenderTarget(int, int)
Creates a render target texture.
IGpuRenderTarget CreateRenderTarget(int width, int height)
Parameters
Returns
- IGpuRenderTarget
A render target that can be used with a command list.