# SwappyVkFunctionProvider

`#include <swappyVk.h>`

A structure enabling you to provide your own Vulkan function wrappers by calling [SwappyVk_setFunctionProvider](https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-vk#group__swappy_vk_1gaf01c9db90ce83020bedf7a0decb53013).

## Summary

Usage of this functionality is optional.

| ### Public attributes ||
|---|---|
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-vk-function-provider#struct_swappy_vk_function_provider_1ada2d16af36ea17c360ca627de4e1dda3)()` | `void(*` Callback to close any resources owned by the function provider. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-vk-function-provider#struct_swappy_vk_function_provider_1ae4f1aa1918557cee3460a79315334d60)(const char *name)` | `void *(*` Callback to get the address of a function. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-vk-function-provider#struct_swappy_vk_function_provider_1a3bfcb8abd63ec74b08a2ec4b8d6ba03e)()` | `bool(*` Callback to initialize the function provider. |

## Public attributes

### close

```scdoc
void(* SwappyVkFunctionProvider::close)()
```
Callback to close any resources owned by the function provider.

This function is called by Swappy when no more functions will be requested, e.g. so you can call dlclose on the Vulkan library.

### getProcAddr

```gdscript
void *(* SwappyVkFunctionProvider::getProcAddr)(const char *name)
```
Callback to get the address of a function.

This function is called by Swappy to get the address of a Vulkan function.

| Details ||
|---|---|
| Parameters | |---|---| | `name` | The null-terminated name of the function. | |

### init

```scdoc
bool(* SwappyVkFunctionProvider::init)()
```
Callback to initialize the function provider.

This function is called by Swappy before any functions are requested. E.g. so you can call dlopen on the Vulkan library.