adding manual image manipulation

This commit is contained in:
kbz_8
2023-04-03 00:01:13 +02:00
parent 7a5e280322
commit e444856964
21 changed files with 465 additions and 122 deletions

40
src/renderer/command/cmd_manager.cpp git.filemode.normal_file
View 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();
}
}