Skip to main content

Class SharedGpuTexture

Namespace: VelloSharp
Assembly: VelloSharp.Gpu.dll

public sealed class SharedGpuTexture : SafeHandle, IDisposable

Inheritance

objectCriticalFinalizerObjectSafeHandleSharedGpuTexture

Implements

IDisposable

Inherited Members

SafeHandle.Close(), SafeHandle.DangerousAddRef(ref bool), SafeHandle.DangerousGetHandle(), SafeHandle.DangerousRelease(), SafeHandle.Dispose(), SafeHandle.SetHandleAsInvalid(), SafeHandle.IsClosed, SafeHandle.IsInvalid, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Fields

SharedFormat

public const WgpuTextureFormat SharedFormat = Bgra8Unorm

Field Value

WgpuTextureFormat

Properties

AdapterLuid

public AdapterLuid AdapterLuid { get; }

Property Value

AdapterLuid

Format

public WgpuTextureFormat Format { get; }

Property Value

WgpuTextureFormat

Height

public uint Height { get; }

Property Value

uint

IsInvalid

When overridden in a derived class, gets a value indicating whether the handle value is invalid.

public override bool IsInvalid { get; }

Property Value

bool

KeyedMutex

public nint KeyedMutex { get; }

Property Value

nint

SharedHandle

public nint SharedHandle { get; }

Property Value

nint

SupportsKeyedMutex

public bool SupportsKeyedMutex { get; }

Property Value

bool

TexturePointer

public nint TexturePointer { get; }

Property Value

nint

WgpuTexturePointer

public nint WgpuTexturePointer { get; }

Property Value

nint

Width

public uint Width { get; }

Property Value

uint

Methods

Create(WgpuDevice, uint, uint, bool, string?)

public static SharedGpuTexture Create(WgpuDevice device, uint width, uint height, bool useKeyedMutex, string? label)

Parameters

device WgpuDevice

width uint

height uint

useKeyedMutex bool

label string?

Returns

SharedGpuTexture

CreateView(WgpuTextureViewDescriptor?)

public WgpuTextureView CreateView(WgpuTextureViewDescriptor? descriptor = null)

Parameters

descriptor WgpuTextureViewDescriptor?

Returns

WgpuTextureView

FlushWriters()

public void FlushWriters()

ReleaseHandle()

When overridden in a derived class, executes the code required to free the handle.

protected override bool ReleaseHandle()

Returns

bool

true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. In this case, it generates a releaseHandleFailed Managed Debugging Assistant.

ReleaseKeyedMutex(ulong)

public void ReleaseKeyedMutex(ulong key)

Parameters

key ulong

TryAcquireKeyedMutex(ulong, uint, out bool)

public bool TryAcquireKeyedMutex(ulong key, uint timeoutMilliseconds, out bool timedOut)

Parameters

key ulong

timeoutMilliseconds uint

timedOut bool

Returns

bool