namespace Brutal.VulkanApi
{
///
/// VkSemaphore - Opaque handle to a semaphore object
///
///
///
/// Semaphores are a synchronization primitive that can be used to insert a
/// dependency
/// between queue operations.
/// Semaphores have two states - signaled and unsignaled.
/// A semaphore can be signaled after execution of a queue operation is
/// completed, and a queue operation can wait for a semaphore to become
/// signaled before it begins execution.
///
///
/// Semaphores are represented by VkSemaphore handles:
///
///
/// // Provided by VK_VERSION_1_0
/// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
///
///
public readonly unsafe struct VkSemaphore : IVulkanHandle
{
///
public VkObjectType VkObjectType => VkObjectType.Semaphore;
///
public nint VkHandle { get; }
/// Construct from an existing pointer
public VkSemaphore(nint handle)
{
VkHandle = handle;
}
///
public bool IsNull()
{
return VkHandle == 0;
}
public static VkSemaphore NullHandle = new();
}
}