![]() |
Raven Engine v0.1
|
Manages Vulkan physical and logical device selection and creation. More...
#include <VulkanDevice.h>
Public Member Functions | |
| VulkanDevice (VkInstance instance, VkSurfaceKHR surface) | |
| Constructs a VulkanDevice bound to a Vulkan instance and surface. | |
| ~VulkanDevice ()=default | |
| Destructor. Defaulted. | |
| void | ShutdownDevice () |
| Cleanly shuts down and releases device resources. | |
| VkDevice | GetLogicalDevice () const |
| Retrieves the Vulkan logical device handle. | |
| VkPhysicalDevice | GetPhysicalDevice () const |
| Retrieves the Vulkan physical device handle. | |
| VkQueue | GetGraphicsQueue () const |
| Gets the graphics queue handle. | |
| VkQueue | GetPresentQueue () const |
| Gets the present queue handle. | |
| VkQueryPool | GetQueryPool () const |
| Gets the Vulkan query pool. | |
| VkSurfaceKHR | GetSurface () const |
| Gets the Vulkan surface associated with this device. | |
| bool | IsSuitable () const |
| Checks whether a suitable physical device was selected. | |
| QueueFamilyIndices | FindQueueFamily () const |
| Finds queue family indices supporting required operations. | |
| operator VkPhysicalDevice () const | |
| Implicit conversion operator to VkPhysicalDevice. | |
| operator VkDevice () const | |
| Implicit conversion operator to VkDevice. | |
Static Public Member Functions | |
| static VulkanDevice & | Get () |
| Access singleton instance of VulkanDevice. | |
Manages Vulkan physical and logical device selection and creation.
This class abstracts Vulkan device setup including selecting a suitable physical device, creating a logical device, and querying relevant queues. Currently supports a single physical device and handles basic extension requirements.
| Raven::VulkanDevice::VulkanDevice | ( | VkInstance | instance, |
| VkSurfaceKHR | surface ) |
Constructs a VulkanDevice bound to a Vulkan instance and surface.
| instance | Vulkan instance to associate with. |
| surface | Vulkan surface to present on. |
|
default |
Destructor. Defaulted.
| QueueFamilyIndices Raven::VulkanDevice::FindQueueFamily | ( | ) | const |
Finds queue family indices supporting required operations.
|
inlinestatic |
Access singleton instance of VulkanDevice.
|
inline |
Gets the graphics queue handle.
|
inline |
Retrieves the Vulkan logical device handle.
|
inline |
Retrieves the Vulkan physical device handle.
|
inline |
Gets the present queue handle.
|
inline |
Gets the Vulkan query pool.
|
inline |
Gets the Vulkan surface associated with this device.
|
inline |
Checks whether a suitable physical device was selected.
|
inline |
Implicit conversion operator to VkDevice.
|
inline |
Implicit conversion operator to VkPhysicalDevice.
| void Raven::VulkanDevice::ShutdownDevice | ( | ) |
Cleanly shuts down and releases device resources.