The application context is the core class which stores the basic openxr and vulkan objects.
More...
#include <ApplicationContext.h>
|
| static void | validateFeature (VkBool32 feature, const std::string &errorMessage) |
The application context is the core class which stores the basic openxr and vulkan objects.
Definition at line 56 of file ApplicationContext.h.
◆ ApplicationContext()
| Engine::Core::ApplicationContext::ApplicationContext |
( |
| ) |
|
|
default |
◆ ~ApplicationContext()
| Engine::Core::ApplicationContext::~ApplicationContext |
( |
| ) |
|
|
default |
◆ checkRequiredEnvironmentBlendModeAvailability()
| void Engine::Core::ApplicationContext::checkRequiredEnvironmentBlendModeAvailability |
( |
| ) |
|
|
private |
Gets the environment blend mode.
- Date
- 2025-02-12
- Author
- Konstantin Passig
◆ cleanup()
| void Engine::Core::ApplicationContext::cleanup |
( |
| ) |
|
performs the cleanup by removing all vulkan and openxr pointers
◆ createDevice()
| void Engine::Core::ApplicationContext::createDevice |
( |
VkSurfaceKHR | mirrorSurface | ) |
|
Creates the vulkan device and all necessary components for it.
- Parameters
-
| mirrorSurface | The mirror surface. |
◆ createOpenXrInstance()
| void Engine::Core::ApplicationContext::createOpenXrInstance |
( |
std::optional< std::filesystem::path > | customOpenXrRuntimePath = std::optional< std::filesystem::path >() | ) |
|
|
private |
Queries supported openxr instance extensions, openxr api layers and creates the XrInstance.
- Date
- 2025-02-12
- Author
- Konstantin Passig
- Exceptions
-
| std::runtime_error | When something which should have been executed failed. |
| EnvironmentException | When for example SteamVR has not been started before launching the application. |
◆ createResources()
| void Engine::Core::ApplicationContext::createResources |
( |
| ) |
|
creates all openxr and vulkan resources
◆ createVulkanInstance()
| void Engine::Core::ApplicationContext::createVulkanInstance |
( |
| ) |
|
|
private |
Creates a vulkan instance.
- Date
- 2025-02-08
- Author
- Konstantin Passig
◆ getGraphicsQueue()
| const VkQueue & Engine::Core::ApplicationContext::getGraphicsQueue |
( |
| ) |
const |
|
nodiscard |
Gets draw queue.
- Returns
- The draw queue.
- Date
- 2025-02-15
- Author
- Konstantin Passig
◆ getMaxPushConstantsSize()
| uint32_t Engine::Core::ApplicationContext::getMaxPushConstantsSize |
( |
| ) |
const |
|
nodiscard |
Gets max push constants size in bytes.
- Returns
- The maximum push constants size supported by the GPU.
- Date
- 2025-10-15
- Author
- Konstantin Passig
◆ getMultisampleCount()
| VkSampleCountFlagBits Engine::Core::ApplicationContext::getMultisampleCount |
( |
| ) |
const |
|
nodiscard |
Gets multisample count.
- Returns
- The multisample count.
- Date
- 2025-02-14
- Author
- Konstantin Passig
◆ getPresentQueue()
| const VkQueue & Engine::Core::ApplicationContext::getPresentQueue |
( |
| ) |
const |
|
nodiscard |
Gets the present queue.
- Returns
- The present queue.
- Date
- 2025-02-15
- Author
- Konstantin Passig
◆ getSamplerCache()
| SamplerCache & Engine::Core::ApplicationContext::getSamplerCache |
( |
| ) |
|
|
inlinenodiscard |
◆ getTransferQueue()
| const VkQueue & Engine::Core::ApplicationContext::getTransferQueue |
( |
| ) |
const |
|
nodiscard |
Gets the transfer queue.
- Returns
- The transfer queue.
- Date
- 2025-04-02
- Author
- Konstantin Passig
◆ getUniformBufferOffsetAlignment()
| VkDeviceSize Engine::Core::ApplicationContext::getUniformBufferOffsetAlignment |
( |
| ) |
const |
|
nodiscard |
Gets uniform buffer offset alignment.
- Returns
- The uniform buffer offset alignment.
- Date
- 2025-02-15
- Author
- Konstantin Passig
◆ getVkDevice()
| const VkDevice Engine::Core::ApplicationContext::getVkDevice |
( |
| ) |
const |
|
nodiscard |
Gets the vulkan device.
- Returns
- The vulkan device.
- Date
- 2025-02-14
- Author
- Konstantin Passig
◆ getVkGraphicsQueueFamilyIndex()
| uint32_t Engine::Core::ApplicationContext::getVkGraphicsQueueFamilyIndex |
( |
| ) |
const |
|
nodiscard |
Gets the zero-based index of the vulkan draw queue family.
- Returns
- The vulkan draw queue family index.
- Date
- 2025-02-14
- Author
- Konstantin Passig
◆ getVkInstance()
| VkInstance Engine::Core::ApplicationContext::getVkInstance |
( |
| ) |
const |
|
nodiscard |
Gets vulkan instance.
- Returns
- The vulkan instance.
◆ getVkPhysicalDevice()
| const VkPhysicalDevice & Engine::Core::ApplicationContext::getVkPhysicalDevice |
( |
| ) |
const |
|
nodiscard |
Gets vulkan physical device.
- Returns
- The vulkan physical device.
- Date
- 2025-02-14
- Author
- Konstantin Passig
◆ getVkTransferQueueFamilyIndex()
| uint32_t Engine::Core::ApplicationContext::getVkTransferQueueFamilyIndex |
( |
| ) |
const |
|
nodiscard |
gets the transfer queue family index
- Returns
- zero indexed transfer queue index
- Date
- 2025-04-02
- Author
- Konstantin Passig
◆ getVmaAllocator()
| VmaAllocator Engine::Core::ApplicationContext::getVmaAllocator |
( |
| ) |
const |
|
nodiscard |
Gets the VMA allocator for memory management.
- Returns
- The VMA allocator instance
- Date
- 2026-01-24
- Author
- Konstantin Passig
◆ getVulkanInstanceExtensions()
| void Engine::Core::ApplicationContext::getVulkanInstanceExtensions |
( |
| ) |
|
|
private |
Gets vulkan instance extensions.
- Date
- 2025-02-08
- Author
- Konstantin Passig
◆ getXrInstance()
| XrInstance Engine::Core::ApplicationContext::getXrInstance |
( |
| ) |
const |
|
nodiscard |
Gets xr instance.
- Returns
- The xr instance.
◆ getXrSystemId()
| XrSystemId Engine::Core::ApplicationContext::getXrSystemId |
( |
| ) |
const |
|
nodiscard |
Gets xr system identifier.
- Returns
- The xr system identifier.
◆ getXrViewType()
| const XrViewConfigurationType Engine::Core::ApplicationContext::getXrViewType |
( |
| ) |
const |
|
nodiscard |
Gets xr view type which should be stereo for any typical VR application.
- Returns
- The xr view type.
- Date
- 2025-02-15
- Author
- Konstantin Passig
◆ isFbColorSpaceSupported()
| bool Engine::Core::ApplicationContext::isFbColorSpaceSupported |
( |
| ) |
const |
|
inlinenodiscard |
◆ isMeshShaderSupported()
| bool Engine::Core::ApplicationContext::isMeshShaderSupported |
( |
| ) |
const |
|
nodiscard |
◆ LoadOpenXrExtensionFunctions()
| void Engine::Core::ApplicationContext::LoadOpenXrExtensionFunctions |
( |
| ) |
|
|
private |
Loads all dynamically loaded xr functions.
◆ logVulkanRequirements()
| void Engine::Core::ApplicationContext::logVulkanRequirements |
( |
| ) |
|
|
private |
Logs vulkan requirements.
- Date
- 2025-02-08
- Author
- Konstantin Passig
◆ pickQueueFamilies()
| void Engine::Core::ApplicationContext::pickQueueFamilies |
( |
VkPhysicalDevice | physicalDevice, |
|
|
VkSurfaceKHR | surface, |
|
|
uint32_t & | outGraphicsIndex, |
|
|
uint32_t & | outPresentIndex, |
|
|
uint32_t & | outTransferIndex ) |
|
private |
gets the device queues needed
- Parameters
-
| physicalDevice | the vulkan physical device |
| surface | the mirror surface |
| outGraphicsIndex | |
| outPresentIndex | |
| outTransferIndex | |
- Date
- 2025-04-02
- Author
- Konstantin Passig
◆ retrieveXrSystemId()
| void Engine::Core::ApplicationContext::retrieveXrSystemId |
( |
| ) |
|
|
private |
Gets the XrSystemId.
- Date
- 2025-02-12
- Author
- Konstantin Passig
◆ usesDedicatedTransferQueue()
| bool Engine::Core::ApplicationContext::usesDedicatedTransferQueue |
( |
| ) |
const |
|
nodiscard |
Check if the transfer queue index is its own, dedicated queue.
- Returns
- if the transfer queue index != graphics queue index
- Date
- 2025-06-18
- Author
- Konstantin Passig
◆ validateFeature()
| void Engine::Core::ApplicationContext::validateFeature |
( |
VkBool32 | feature, |
|
|
const std::string & | errorMessage ) |
|
staticprivate |
◆ fbColorSpaceSupported_
| bool Engine::Core::ApplicationContext::fbColorSpaceSupported_ = false |
|
private |
◆ maxPushConstantsSize
| uint32_t Engine::Core::ApplicationContext::maxPushConstantsSize = 128u |
|
private |
◆ meshShaderSupported_
| bool Engine::Core::ApplicationContext::meshShaderSupported_ = false |
|
private |
◆ multisampleCount
| VkSampleCountFlagBits Engine::Core::ApplicationContext::multisampleCount = VK_SAMPLE_COUNT_1_BIT |
|
private |
◆ queueFamily
◆ samplerCache_
| SamplerCache Engine::Core::ApplicationContext::samplerCache_ |
|
private |
◆ supportedOpenXRApiLayers
| std::vector<XrApiLayerProperties> Engine::Core::ApplicationContext::supportedOpenXRApiLayers |
|
private |
◆ supportedOpenXRInstanceExtensions
| std::vector<XrExtensionProperties> Engine::Core::ApplicationContext::supportedOpenXRInstanceExtensions |
|
private |
◆ supportedVulkanDeviceExtensions
| std::vector<VkExtensionProperties> Engine::Core::ApplicationContext::supportedVulkanDeviceExtensions |
|
private |
◆ supportedVulkanInstanceExtensions
| std::vector<VkExtensionProperties> Engine::Core::ApplicationContext::supportedVulkanInstanceExtensions |
|
private |
◆ uniformBufferOffsetAlignment
| VkDeviceSize Engine::Core::ApplicationContext::uniformBufferOffsetAlignment = 0u |
|
private |
◆ vkDevice
| VkDevice Engine::Core::ApplicationContext::vkDevice = VK_NULL_HANDLE |
|
private |
◆ vkInstance
| VkInstance Engine::Core::ApplicationContext::vkInstance = VK_NULL_HANDLE |
|
private |
◆ vkPhysicalDevice
| VkPhysicalDevice Engine::Core::ApplicationContext::vkPhysicalDevice = VK_NULL_HANDLE |
|
private |
◆ vmaAllocator_
| VmaAllocator Engine::Core::ApplicationContext::vmaAllocator_ = VK_NULL_HANDLE |
|
private |
◆ vulkanDeviceExtensions
| std::vector<const char *> Engine::Core::ApplicationContext::vulkanDeviceExtensions |
|
private |
◆ vulkanInstanceExtensions
| std::vector<const char *> Engine::Core::ApplicationContext::vulkanInstanceExtensions |
|
private |
(Immutable) the vulkan instance extensions which should get enabled
Definition at line 368 of file ApplicationContext.h.
◆ xrCreateVulkanDeviceKHR
| PFN_xrCreateVulkanDeviceKHR Engine::Core::ApplicationContext::xrCreateVulkanDeviceKHR = nullptr |
|
private |
◆ xrCreateVulkanInstanceKHR
| PFN_xrCreateVulkanInstanceKHR Engine::Core::ApplicationContext::xrCreateVulkanInstanceKHR = nullptr |
|
private |
◆ xrGetVulkanGraphicsDevice2KHR
| PFN_xrGetVulkanGraphicsDevice2KHR Engine::Core::ApplicationContext::xrGetVulkanGraphicsDevice2KHR = nullptr |
|
private |
◆ xrGetVulkanGraphicsRequirements2KHR
| PFN_xrGetVulkanGraphicsRequirements2KHR Engine::Core::ApplicationContext::xrGetVulkanGraphicsRequirements2KHR = nullptr |
|
private |
◆ xrGetVulkanInstanceExtensionsKHR
| PFN_xrGetVulkanInstanceExtensionsKHR Engine::Core::ApplicationContext::xrGetVulkanInstanceExtensionsKHR = nullptr |
|
private |
◆ xrInstance
| XrInstance Engine::Core::ApplicationContext::xrInstance = XR_NULL_HANDLE |
|
private |
◆ xrSystemId
| XrSystemId Engine::Core::ApplicationContext::xrSystemId = XR_NULL_SYSTEM_ID |
|
private |
Identifier for the xr device. So the identifier for the headset.
Definition at line 358 of file ApplicationContext.h.
The documentation for this class was generated from the following file: