Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
VulkanContext.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
11#include <string_view>
12
13namespace correlation::render3d {
14
20public:
25 [[nodiscard]] static bool isSupported() noexcept {
26#ifdef CORRELATION_USE_VULKAN
27 return probeVulkanDevice();
28#else
29 return false;
30#endif
31 }
32
37 [[nodiscard]] static std::string_view statusMessage() noexcept {
38#ifdef CORRELATION_USE_VULKAN
39 return probeVulkanDevice() ? "Vulkan headless GPU available"
40 : "Vulkan drivers found but no compatible physical device";
41#else
42 return "Vulkan disabled at build time (CPU rasterizer active)";
43#endif
44 }
45
46private:
47#ifdef CORRELATION_USE_VULKAN
48 [[nodiscard]] static bool probeVulkanDevice() noexcept;
49#endif
50};
51
52} // namespace correlation::render3d
Inspects host Vulkan drivers and physical devices for headless rendering.
Definition VulkanContext.hpp:19
static bool isSupported() noexcept
Checks if a functional Vulkan driver and physical device are present.
Definition VulkanContext.hpp:25
static std::string_view statusMessage() noexcept
Descriptive status of the Vulkan subsystem.
Definition VulkanContext.hpp:37
Definition Camera3D.hpp:14