2020-02-25 00:44:40 +01:00
|
|
|
#include "WindowManager.h"
|
2020-03-15 15:58:01 +01:00
|
|
|
#include "Vulkan/VulkanGraphics.h"
|
2020-02-25 00:44:40 +01:00
|
|
|
|
2020-03-05 11:43:38 +01:00
|
|
|
Seele::WindowManager::WindowManager()
|
2020-02-25 00:44:40 +01:00
|
|
|
{
|
2020-03-15 15:58:01 +01:00
|
|
|
graphics = new VulkanGraphics();
|
|
|
|
|
GraphicsInitializer initializer;
|
|
|
|
|
graphics->init(initializer);
|
2020-02-25 00:44:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Seele::WindowManager::~WindowManager()
|
|
|
|
|
{
|
|
|
|
|
}
|
2020-03-05 11:43:38 +01:00
|
|
|
|
|
|
|
|
void Seele::WindowManager::addWindow(const WindowCreateInfo& createInfo)
|
|
|
|
|
{
|
2020-03-16 13:29:17 +01:00
|
|
|
PWindow window = new Window(createInfo, graphics);
|
2020-03-05 11:43:38 +01:00
|
|
|
windows.add(window);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Seele::WindowManager::beginFrame()
|
|
|
|
|
{
|
|
|
|
|
for (auto window : windows)
|
|
|
|
|
{
|
|
|
|
|
window->beginFrame();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Seele::WindowManager::endFrame()
|
|
|
|
|
{
|
|
|
|
|
for (auto window : windows)
|
|
|
|
|
{
|
|
|
|
|
window->endFrame();
|
|
|
|
|
}
|
|
|
|
|
}
|