pub struct FunctionPointers{}
lazy_static! {
pub static ref FP: FunctionPointers = FunctionPointers{};
}
I am currently experimenting with Vulkan and I need to load the function pointers once after I have created the instance.
I want to write something like this
FP = load_function_pointers(&instance);
And then:
FP.CreateDevice(...);
Which probably needs a lock just to be safe, but after that it can be safely accessed and I don't want to lock it every time I want to call a function.
What are my options?