Skip to content

IGpuTextureSource.GetTextureHandle method

Returns the native GPU texture handle this source owns, or 0 when the resource has not been allocated yet.

public IntPtr GetTextureHandle()

Interpretation depends on the consuming backend; backend-typed handles are exposed by per-backend marker interfaces, and this method is the backend-agnostic accessor for consumers that do not need to disambiguate. The handle remains owned by the source, so wrapping consumers must wrap it as borrowed (non-owning) to avoid a double free.