Class VulkanInstance

Class Documentation

class VulkanInstance

Vulkan instance wrapper with debug messenger and physical device enumeration.

Creates the Vulkan instance, optional debug messenger (VK_EXT_debug_utils), and enumerates all available GPUs. Provides get_suitable_gpu() to select the best device based on extension support and queue family capabilities.

Public Functions

explicit VulkanInstance(vk::raii::Context &context)

Creates Vulkan instance and debug messenger.

Parameters:

context – The vk::raii::Context (must outlive this instance)

const vk::raii::Instance &get_instance() const

Gets the Vulkan instance handle.

const DebugMessenger &get_debug_messenger() const

Gets the debug messenger.

VulkanPhysicalDevice &get_suitable_gpu() const

Selects a suitable GPU from available physical devices.

Returns:

Reference to selected physical device