KRDeviceManager::getDeviceInfo refactored to KRDeviceManager::getDevice, and now returns a unique_ptr.

Now freeing vertex and index buffers.
This commit is contained in:
2022-01-22 01:32:32 -08:00
parent ad596a82f9
commit 100ab0d3de
6 changed files with 68 additions and 65 deletions

View File

@@ -47,7 +47,7 @@ public:
bool haveVulkan() const;
bool haveDevice() const;
KRDevice& getDeviceInfo(KrDeviceHandle handle);
std::unique_ptr<KRDevice>& getDevice(KrDeviceHandle handle);
VkInstance& getVulkanInstance();
KrSurfaceHandle getBestDeviceForSurface(const VkSurfaceKHR& surface);
unordered_map<KrDeviceHandle, std::unique_ptr<KRDevice>>& getDevices();