mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
39 lines
1 KiB
C#
39 lines
1 KiB
C#
namespace Brutal.VulkanApi.Abstractions;
|
|
|
|
/// <summary>
|
|
/// Structure to hold synchronization objects for the Renderer
|
|
/// </summary>
|
|
public class SyncObjects(Device inDevice) : IDisposable
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public required VkSemaphore ImageReadySemaphore;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public required VkSemaphore RenderingFinishedSemaphore;
|
|
|
|
/// <summary>
|
|
/// Signaled Fence
|
|
/// </summary>
|
|
public required VkFence Fence;
|
|
|
|
/// <summary>
|
|
/// A CommandBuffer from the Graphics pool which can be used for rendering commands.
|
|
/// </summary>
|
|
public required CommandBuffer CommandBuffer;
|
|
|
|
/// <summary>
|
|
/// The allocator the sync objects were created with
|
|
/// </summary>
|
|
public required VkAllocator? Allocator;
|
|
|
|
public void Dispose()
|
|
{
|
|
inDevice.DestroyFence(Fence, Allocator);
|
|
inDevice.DestroySemaphore(ImageReadySemaphore, Allocator);
|
|
inDevice.DestroySemaphore(RenderingFinishedSemaphore, Allocator);
|
|
}
|
|
}
|