mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 15:13:34 +00:00
begenning the refactor
This commit is contained in:
40
runtime/Includes/Renderer/Core/Fence.h
git.filemode.normal_file
40
runtime/Includes/Renderer/Core/Fence.h
git.filemode.normal_file
@@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Fence.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/02 17:52:09 by maldavid #+# #+# */
|
||||
/* Updated: 2024/03/27 22:48:31 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_VK_FENCE__
|
||||
#define __MLX_VK_FENCE__
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
class Fence
|
||||
{
|
||||
public:
|
||||
Fence() = default;
|
||||
|
||||
void Init();
|
||||
|
||||
inline VkFence& Get() noexcept { return m_fence; }
|
||||
void Wait() noexcept;
|
||||
void Reset() noexcept;
|
||||
bool IsReady() const noexcept;
|
||||
MLX_FORCEINLINE void WaitAndReset() noexcept { Wait(); Reset(); }
|
||||
|
||||
void Destroy() noexcept;
|
||||
|
||||
~Fence() = default;
|
||||
|
||||
private:
|
||||
VkFence m_fence = VK_NULL_HANDLE;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user