Merge pull request #292 from COM8/get_instance

Added an option to get the current vk instance
This commit is contained in:
Alejandro Saucedo 2022-06-21 09:15:10 +02:00 committed by GitHub
commit 5dc47b1aa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;