From 5a6470346dd960c7660c78aa3a9f7099948c8f71 Mon Sep 17 00:00:00 2001 From: Squareys Date: Wed, 20 Jul 2016 14:53:41 +0200 Subject: [PATCH] Vk: Changes to PhysicalDevice --- src/Magnum/Vk/PhysicalDevice.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Vk/PhysicalDevice.h b/src/Magnum/Vk/PhysicalDevice.h index 0898aef73..a9cb8911b 100644 --- a/src/Magnum/Vk/PhysicalDevice.h +++ b/src/Magnum/Vk/PhysicalDevice.h @@ -52,8 +52,12 @@ enum class QueueFlag: UnsignedInt { class MAGNUM_VK_EXPORT PhysicalDevice { public: - /** @brief Copying is not allowed */ - PhysicalDevice(const PhysicalDevice&) = delete; + PhysicalDevice(): _physicalDevice{} { + } + + PhysicalDevice(const PhysicalDevice& d): + PhysicalDevice(d._physicalDevice) { + } /** @brief Move constructor */ PhysicalDevice(PhysicalDevice&& other); @@ -72,7 +76,14 @@ class MAGNUM_VK_EXPORT PhysicalDevice { ~PhysicalDevice(); /** @brief Copying is not allowed */ - PhysicalDevice& operator=(const PhysicalDevice&) = delete; + PhysicalDevice& operator=(const PhysicalDevice& device){ + _physicalDevice = device._physicalDevice; + + _deviceMemoryProperties.memoryHeapCount = 0; + _deviceMemoryProperties.memoryTypeCount = 0; + + return *this; + } /** @brief Move assignment is not allowed */ PhysicalDevice& operator=(PhysicalDevice&&) = delete;