3#include <vk_mem_alloc.h>
5#include <vulkan/vulkan.hpp>
6#include <vulkan/vulkan_handles.hpp>
17 const std::string &application_name,
18 const std::vector<std::string_view> &requested_extensions = {},
19 const std::vector<std::string_view> &requested_layers = {})
20 ->
expected<std::shared_ptr<GraphicsContext>>;
56 const std::string &application_name,
57 const std::vector<std::string_view> &requested_extensions = {},
58 const std::vector<std::string_view> &requested_layers = {})
78 ::vk::DebugUtilsMessengerEXT debug_messenger;
Definition graphics_context.hpp:14
static auto Create(const std::string &application_name, const std::vector< std::string_view > &requested_extensions={}, const std::vector< std::string_view > &requested_layers={}) -> expected< std::shared_ptr< GraphicsContext > >
Definition graphics_context.cpp:20
auto CreateDevice() -> expected< void >
Definition graphics_context.cpp:194
auto operator=(GraphicsContext &&)=delete
auto IsDeviceSuitable(const ::vk::PhysicalDevice &device) -> bool
Definition graphics_context.cpp:169
auto Surface() const -> ::vk::SurfaceKHR
Definition graphics_context.hpp:32
GraphicsContext()=default
auto FindQueueFamilyIndices()
Definition graphics_context.hpp:48
auto operator=(const GraphicsContext &)=delete
auto PhysicalDevice() const -> ::vk::PhysicalDevice
Definition graphics_context.hpp:34
auto PickPhysicalDevice() -> expected< void >
Definition graphics_context.cpp:152
vulkan::Device device
Definition graphics_context.hpp:70
GraphicsContext(GraphicsContext &&)=delete
auto SetupDevice() -> expected< void >
Definition graphics_context.cpp:124
auto GetSwapchainSupport()
Definition graphics_context.hpp:44
::vk::SurfaceKHR surface
Definition graphics_context.hpp:72
::vk::PhysicalDevice physical_device
Definition graphics_context.hpp:68
~GraphicsContext()
Definition graphics_context.cpp:49
auto allocator() const
Definition graphics_context.hpp:40
GraphicsContext(const GraphicsContext &)=delete
void Surface(const ::vk::SurfaceKHR &surface)
Definition graphics_context.hpp:31
auto CreateInstance(const std::string &application_name, const std::vector< std::string_view > &requested_extensions={}, const std::vector< std::string_view > &requested_layers={}) -> expected< void >
Definition graphics_context.cpp:51
auto CreateAllocator() -> expected< void >
auto Device() const -> const vulkan::Device &
Definition graphics_context.hpp:38
auto InitializeSurface() -> expected< void >
::vk::Instance instance
Definition graphics_context.hpp:67
auto Instance() const
Definition graphics_context.hpp:30
VmaAllocator allocator_
Definition graphics_context.hpp:74
static auto find_queue_family_indices(const ::vk::PhysicalDevice &physical_device, const std::optional<::vk::SurfaceKHR > &surface={}) -> expected< QueueFamilyIndices >
Definition queue.cpp:12
auto get_swapchain_support_details(const ::vk::PhysicalDevice &physical_device, const ::vk::SurfaceKHR &surface) -> expected< SwapchainSupportDetails >
Definition vulkan.cpp:77
Definition editor_scene.hpp:5
std::expected< T, Err > expected
Definition result.hpp:49