2020-02-25 00:44:40 +01:00
|
|
|
#include "Window.h"
|
2020-03-02 19:07:49 +01:00
|
|
|
#include "Vulkan/VulkanGraphics.h"
|
2020-03-05 11:43:38 +01:00
|
|
|
#include "SceneView.h"
|
2020-02-25 00:44:40 +01:00
|
|
|
|
|
|
|
|
Seele::Window::Window(const WindowCreateInfo& createInfo)
|
2020-03-02 19:07:49 +01:00
|
|
|
: width(createInfo.width)
|
|
|
|
|
, height(createInfo.height)
|
2020-02-25 00:44:40 +01:00
|
|
|
{
|
2020-03-06 11:32:01 +01:00
|
|
|
graphics = new VulkanGraphics();
|
2020-03-05 11:43:38 +01:00
|
|
|
center = new Section();
|
|
|
|
|
center->resizeArea(Rect(1, 1, 0, 0));
|
2020-03-06 11:32:01 +01:00
|
|
|
center->addView(new SceneView(graphics));
|
2020-03-05 11:43:38 +01:00
|
|
|
windowHandle = graphics->createWindow(createInfo);
|
2020-02-25 00:44:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Seele::Window::~Window()
|
|
|
|
|
{
|
2020-03-02 19:07:49 +01:00
|
|
|
}
|
2020-03-05 11:43:38 +01:00
|
|
|
|
|
|
|
|
void Seele::Window::beginFrame()
|
|
|
|
|
{
|
|
|
|
|
graphics->beginFrame(windowHandle);
|
|
|
|
|
center->beginFrame();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Seele::Window::endFrame()
|
|
|
|
|
{
|
|
|
|
|
graphics->endFrame(windowHandle);
|
|
|
|
|
}
|