mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-13 07:33:34 +00:00
adding manual image manipulation
This commit is contained in:
40
src/renderer/command/cmd_manager.cpp
git.filemode.normal_file
40
src/renderer/command/cmd_manager.cpp
git.filemode.normal_file
@@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* cmd_manager.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/02 17:50:52 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/02 17:51:46 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <renderer/command/cmd_manager.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
void CmdManager::init() noexcept
|
||||
{
|
||||
_cmd_pool.init();
|
||||
for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++)
|
||||
_cmd_buffers[i].init(this);
|
||||
}
|
||||
|
||||
void CmdManager::beginRecord(int active_image_index)
|
||||
{
|
||||
_cmd_buffers[active_image_index].beginRecord();
|
||||
}
|
||||
|
||||
void CmdManager::endRecord(int active_image_index)
|
||||
{
|
||||
_cmd_buffers[active_image_index].endRecord();
|
||||
}
|
||||
|
||||
void CmdManager::destroy() noexcept
|
||||
{
|
||||
for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++)
|
||||
_cmd_buffers[i].destroy();
|
||||
_cmd_pool.destroy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user