This commit is contained in:
2024-04-21 18:10:36 +02:00
parent 6bbf1e196d
commit 215a0dc2c3
28 changed files with 558 additions and 375 deletions

30
runtime/Includes/Core/DriverLoader.inl git.filemode.normal_file
View File

@@ -0,0 +1,30 @@
/* **************************************************************************** */
/* */
/* ::: :::::::: */
/* DriverLoader.inl :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/03 14:55:01 by maldavid #+# #+# */
/* Updated: 2024/04/03 14:55:01 by maldavid ### ########.fr */
/* */
/* **************************************************************************** */
#pragma once
#include <Core/DriverLoader.h>
namespace mlx
{
template <typename T>
bool DriverLoader::LoadDriver()
{
m_instances.emplace_back(new T)->InitDriver();
}
void DriverLoader::ShutdownAllDrivers()
{
for(auto& driver : m_instances)
driver->ShutdownDriver();
m_instances.clear();
}
}