light/modules/renderer/private/vk/context/context.hpp

48 lines
884 B
C++

#pragma once
#include <app/system.hpp>
#include <ecs/entity.hpp>
#include <memory/pointer_types/null_on_move.hpp>
#include <surface/components.hpp>
//
#include <renderer/vk/context/device.hpp>
#include <renderer/vk/context/instance.hpp>
#include <renderer/vk/context/surface.hpp>
#include <renderer/vk/context/swapchain.hpp>
namespace lt::renderer::vk {
using memory::NullOnMove;
class Context
{
public:
Context(const ecs::Entity &surface_entity, Ref<app::SystemStats> system_stats);
[[nodiscard]] auto instance() const -> VkInstance
{
return Instance::get();
}
[[nodiscard]] auto device() const -> const Device &
{
return m_device;
}
[[nodiscard]] auto swapchain() const -> const Swapchain &
{
return m_swapchain;
}
private:
Ref<app::SystemStats> m_stats;
Surface m_surface;
Device m_device;
Swapchain m_swapchain;
};
} // namespace lt::renderer::vk