Added an option to get the current vk instance

Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
Fabian Sauter 2022-06-21 09:08:30 +02:00
parent e232f28e0d
commit 888413fbcf
2 changed files with 14 additions and 0 deletions

View file

@ -450,4 +450,10 @@ Manager::listDevices() const
return this->mInstance->enumeratePhysicalDevices();
}
std::shared_ptr<vk::Instance>
Manager::getVkInstance() const
{
return this->mInstance;
}
}

View file

@ -214,6 +214,14 @@ class Manager
**/
std::vector<vk::PhysicalDevice> listDevices() const;
/**
* The current Vulkan instance.
*
* @return a shared pointer to the current Vulkan instance held by this
*object
**/
std::shared_ptr<vk::Instance> getVkInstance() const;
private:
// -------------- OPTIONALLY OWNED RESOURCES
std::shared_ptr<vk::Instance> mInstance = nullptr;