Add system graph (wip)

This commit is contained in:
SirLynix
2022-07-02 19:45:50 +02:00
parent 4d24be2ae9
commit 1b678defae
18 changed files with 524 additions and 286 deletions

View File

@@ -3,10 +3,23 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Graphics/Systems/RenderSystem.hpp>
#include <type_traits>
#include <Nazara/Graphics/Debug.hpp>
namespace Nz
{
template<typename T, typename ...Args>
T& RenderSystem::CreateWindow(Args&& ...args)
{
static_assert(std::is_base_of_v<RenderWindow, T>, "T must inherit RenderWindow");
auto windowPtr = std::make_unique<T>(std::forward<Args>(args)...);
T& windowRef = *windowPtr;
m_renderWindows.emplace_back(std::move(windowPtr));
return windowRef;
}
}
#include <Nazara/Graphics/DebugOff.hpp>