wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::GraphicsContext Class Reference

#include <graphics_context.hpp>

Collaboration diagram for wren::GraphicsContext:

Public Member Functions

 GraphicsContext (const GraphicsContext &)=delete
 
 GraphicsContext (GraphicsContext &&)=delete
 
auto operator= (const GraphicsContext &)=delete
 
auto operator= (GraphicsContext &&)=delete
 
 ~GraphicsContext ()
 
auto InitializeSurface () -> expected< void >
 
auto Instance () const
 
void Surface (const ::vk::SurfaceKHR &surface)
 
auto Surface () const -> ::vk::SurfaceKHR
 
auto PhysicalDevice () const -> ::vk::PhysicalDevice
 
auto Device () const -> const vulkan::Device &
 
auto allocator () const
 
auto SetupDevice () -> expected< void >
 
auto GetSwapchainSupport ()
 
auto FindQueueFamilyIndices ()
 

Static Public Member Functions

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 > >
 

Private Member Functions

 GraphicsContext ()=default
 
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 >
 
auto CreateAllocator () -> expected< void >
 
auto CreateDevice () -> expected< void >
 
auto PickPhysicalDevice () -> expected< void >
 
auto IsDeviceSuitable (const ::vk::PhysicalDevice &device) -> bool
 

Private Attributes

::vk::Instance instance
 
::vk::PhysicalDevice physical_device
 
vulkan::Device device
 
::vk::SurfaceKHR surface
 
VmaAllocator allocator_ {}
 

Constructor & Destructor Documentation

◆ GraphicsContext() [1/3]

wren::GraphicsContext::GraphicsContext ( const GraphicsContext & )
delete

◆ GraphicsContext() [2/3]

wren::GraphicsContext::GraphicsContext ( GraphicsContext && )
delete

◆ ~GraphicsContext()

wren::GraphicsContext::~GraphicsContext ( )

◆ GraphicsContext() [3/3]

wren::GraphicsContext::GraphicsContext ( )
privatedefault

Member Function Documentation

◆ allocator()

auto wren::GraphicsContext::allocator ( ) const
inline

◆ Create()

auto wren::GraphicsContext::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>>
static
Here is the caller graph for this function:

◆ CreateAllocator()

auto wren::GraphicsContext::CreateAllocator ( ) -> expected< void >
private

◆ CreateDevice()

auto wren::GraphicsContext::CreateDevice ( ) -> expected<void>
private
Here is the call graph for this function:

◆ CreateInstance()

auto wren::GraphicsContext::CreateInstance ( const std::string & application_name,
const std::vector< std::string_view > & requested_extensions = {},
const std::vector< std::string_view > & requested_layers = {} ) -> expected<void>
private
Here is the call graph for this function:

◆ Device()

auto wren::GraphicsContext::Device ( ) const -> const vulkan::Device &
inline

◆ FindQueueFamilyIndices()

auto wren::GraphicsContext::FindQueueFamilyIndices ( )
inline
Here is the call graph for this function:

◆ GetSwapchainSupport()

auto wren::GraphicsContext::GetSwapchainSupport ( )
inline
Here is the call graph for this function:

◆ InitializeSurface()

auto wren::GraphicsContext::InitializeSurface ( ) -> expected< void >

◆ Instance()

auto wren::GraphicsContext::Instance ( ) const
inline

◆ IsDeviceSuitable()

auto wren::GraphicsContext::IsDeviceSuitable ( const ::vk::PhysicalDevice & device) -> bool
private
Here is the call graph for this function:

◆ operator=() [1/2]

auto wren::GraphicsContext::operator= ( const GraphicsContext & )
delete

◆ operator=() [2/2]

auto wren::GraphicsContext::operator= ( GraphicsContext && )
delete

◆ PhysicalDevice()

auto wren::GraphicsContext::PhysicalDevice ( ) const -> ::vk::PhysicalDevice
inline

◆ PickPhysicalDevice()

auto wren::GraphicsContext::PickPhysicalDevice ( ) -> expected<void>
private

◆ SetupDevice()

auto wren::GraphicsContext::SetupDevice ( ) -> expected<void>

◆ Surface() [1/2]

auto wren::GraphicsContext::Surface ( ) const -> ::vk::SurfaceKHR
inline

◆ Surface() [2/2]

void wren::GraphicsContext::Surface ( const ::vk::SurfaceKHR & surface)
inline

Member Data Documentation

◆ allocator_

VmaAllocator wren::GraphicsContext::allocator_ {}
private

◆ device

vulkan::Device wren::GraphicsContext::device
private

◆ instance

::vk::Instance wren::GraphicsContext::instance
private

◆ physical_device

::vk::PhysicalDevice wren::GraphicsContext::physical_device
private

◆ surface

::vk::SurfaceKHR wren::GraphicsContext::surface
private

The documentation for this class was generated from the following files: