mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
begenning the refactor
This commit is contained in:
49
runtime/Includes/Renderer/Command/SingleTimeCmdManager.h
git.filemode.normal_file
49
runtime/Includes/Renderer/Command/SingleTimeCmdManager.h
git.filemode.normal_file
@@ -0,0 +1,49 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* SingleTimeCmdManager.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/12/15 18:25:57 by maldavid #+# #+# */
|
||||
/* Updated: 2024/03/27 22:46:48 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_SINGLE_TIME_CMD_MANAGER__
|
||||
#define __MLX_SINGLE_TIME_CMD_MANAGER__
|
||||
|
||||
#include <Renderer/Command/CommandBuffer.h>
|
||||
#include <Renderer/Command/CommandPool.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
class CommandBuffer;
|
||||
|
||||
class SingleTimeCmdManager
|
||||
{
|
||||
friend class RenderCore;
|
||||
|
||||
public:
|
||||
SingleTimeCmdManager() = default;
|
||||
|
||||
void Init() noexcept;
|
||||
void Destroy() noexcept;
|
||||
|
||||
void UpdateSingleTimesCmdBuffersSubmitState() noexcept;
|
||||
void WaitForAllExecutions() noexcept;
|
||||
|
||||
inline CommandPool& GetCmdPool() noexcept { return m_pool; }
|
||||
CommanddBuffer& GetCmdBuffer() noexcept;
|
||||
|
||||
~SingleTimeCmdManager() = default;
|
||||
|
||||
inline static constexpr const std::uint8_t BASE_POOL_SIZE = 16;
|
||||
|
||||
private:
|
||||
std::vector<CommanddBuffer> m_buffers;
|
||||
CommanddPool m_pool;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user