Add volk for function loading (required on platforms such as Android)

This commit is contained in:
jayden committed 2025-11-26 00:41:07 +10:00
1 parent 952efa784b
commit cfcc0478dc
4 files changed
+33 -1

No files matched your search

+12
View File
@@ -4,6 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#if defined(NOVA_USE_VOLK)
#include <volk.h>
#endif
#include <vulkan/vulkan.h>
#include <format>
@@ -13,6 +17,14 @@
namespace nova::gfx {
VulkanContext::VulkanContext() {
#if defined(NOVA_USE_VOLK)
if (volkInitialize() != VK_SUCCESS) {
throw std::runtime_error("Failed to initialize volk");
}
#endif
}
API VulkanContext::get_api() const {
return API::VULKAN;
}
+2
View File
@@ -14,6 +14,8 @@ namespace nova::gfx {
class VulkanContext final : public IContext {
public:
VulkanContext();
API get_api() const override;
std::string get_api_name() const override;