glfwGetInstanceProcAddress

Returns the address of the specified Vulkan instance function.

This function returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to null it can return any function exported from the Vulkan loader, including at least the following functions:

- vkEnumerateInstanceExtensionProperties - vkEnumerateInstanceLayerProperties - vkCreateInstance - vkGetInstanceProcAddr

If Vulkan is not available on the machine, this function returns null and generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether Vulkan is at least minimally available.

This function is equivalent to calling vkGetInstanceProcAddr with a platform-specific query of the Vulkan loader as a fallback.

version(VK_VERSION_1_0)
extern (C) @nogc nothrow __gshared
glfwGetInstanceProcAddress
(
VkInstance instance
,
const(char)* procname
)

Parameters

instance VkInstance

The Vulkan instance to query, or null to retrieve functions related to instance creation.

procname const(char)*

The ASCII encoded name of the function.

Return Value

The address of the function, or null if an error occurred.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_API_UNAVAILABLE.

Pointer lifetime

The returned function pointer is valid until the library is terminated.

Thread Safety

This function may be called from any thread.

@sa @ref vulkan_proc

Meta

Since

Added in version 3.2.

Ingroup: vulkan