namespace Brutal.VulkanApi.Abstractions;
///
/// Structure to hold synchronization objects for the Renderer
///
public class SyncObjects(Device inDevice) : IDisposable
{
///
///
///
public required VkSemaphore ImageReadySemaphore;
///
///
///
public required VkSemaphore RenderingFinishedSemaphore;
///
/// Signaled Fence
///
public required VkFence Fence;
///
/// A CommandBuffer from the Graphics pool which can be used for rendering commands.
///
public required CommandBuffer CommandBuffer;
///
/// The allocator the sync objects were created with
///
public required VkAllocator? Allocator;
public void Dispose()
{
inDevice.DestroyFence(Fence, Allocator);
inDevice.DestroySemaphore(ImageReadySemaphore, Allocator);
inDevice.DestroySemaphore(RenderingFinishedSemaphore, Allocator);
}
}