From 64131038a4f0c3e3f5f5b95e083f0320a68de058 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 14 Jan 2023 15:21:36 -0500 Subject: Allow applications to specify the Vulkan library path I don't know if vendoring the Vulkan library is appropriate, but regardless, this allows applications to set the name to whatever they want, or specify an absolute path, just in case the standard value baked into Pugl isn't the right one in some situation. --- include/pugl/vulkan.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/pugl/vulkan.h b/include/pugl/vulkan.h index 0ca7941..cc138df 100644 --- a/include/pugl/vulkan.h +++ b/include/pugl/vulkan.h @@ -58,11 +58,20 @@ typedef struct PuglVulkanLoaderImpl PuglVulkanLoader; This dynamically loads the Vulkan library and gets the load functions from it. + @param world The world the returned loader is a part of. + + @param libraryName The name of the Vulkan library to load, or null. + Typically, this is left unset, which will load the standard Vulkan library + for the current platform. It can be set to an alternative name, or an + absolute path, to support special packaging scenarios or unusual system + configurations. This name is passed directly to the underlying platform + library loading function (`dlopen` or `LoadLibrary`). + @return A new Vulkan loader, or null on failure. */ PUGL_API PuglVulkanLoader* -puglNewVulkanLoader(PuglWorld* world); +puglNewVulkanLoader(PuglWorld* world, const char* libraryName); /** Free a loader created with puglNewVulkanLoader(). -- cgit v1.2.1