#include "Window/Window.h"

#include "Window/GLFWImpl/GLFWImpl.h"

Window::Window(DriverSettings& driverSetting, const WindowSettings& settings, std::unique_ptr<WindowImpl> impl) noexcept
    : driverSetting_(driverSetting)
    , settings_(settings)
    , impl_(std::move(impl)) {
    impl_->Create(settings_);
}

bool Window::ShouldClose() const {
    return impl_->ShouldClose();
}

void Window::MakeCurrentContext() const {
    impl_->MakeCurrentContext();
}

void Window::SwapBuffers() const {
    impl_->SwapBuffers();
}
