namespace Brutal.VulkanApi { /// /// VkFence - Opaque handle to a fence object /// /// /// /// Fences are a synchronization primitive that can be used to insert a /// dependency from a queue to the host. /// Fences have two states - signaled and unsignaled. /// A fence can be signaled as part of the execution of a /// queue submission^ command. /// Fences can be unsignaled on the host with vkResetFences. /// Fences can be waited on by the host with the vkWaitForFences command, /// and the current state can be queried with vkGetFenceStatus. /// /// /// Fences are represented by VkFence handles: /// /// /// // Provided by VK_VERSION_1_0 /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) /// /// public readonly unsafe struct VkFence : IVulkanHandle { /// public VkObjectType VkObjectType => VkObjectType.Fence; /// public nint VkHandle { get; } /// Construct from an existing pointer public VkFence(nint handle) { VkHandle = handle; } /// public bool IsNull() { return VkHandle == 0; } public static VkFence NullHandle = new(); } }