Auto-Vk-Toolkit
Auto-Vk-Toolkit copied to clipboard
Design of `avk::context()` actually prevents building as shared library
Hi,
Thanks for the library!
But the code inside auto_vk_toolkit.hpp will actually be troublesome if Auto-Vk-Toolkit
is linked dynamically, since multiple context_vulkan
instances will exists in different part of the code (one in so/dll, another in the main program because it's inlined).
// include/auto_vk_toolkit.hpp#L201
inline auto& context()
{
static context_vulkan sContext;
return sContext;
}
I agree that it would be cool to have the possibility to build as dynamic library. Unfortunately, I am currently unable to work on a refactoring like this, but pull requests are always welcome.