From 6be20fb9e36d8b7f9ebb5a2994127ab8b773e6f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Tue, 10 Oct 2023 08:38:18 +0200 Subject: [PATCH] Fix documentation on existance of some copyable vk::raii classes (#1687) --- vk_raii_ProgrammingGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vk_raii_ProgrammingGuide.md b/vk_raii_ProgrammingGuide.md index 98049ed..99a678d 100644 --- a/vk_raii_ProgrammingGuide.md +++ b/vk_raii_ProgrammingGuide.md @@ -31,7 +31,7 @@ Other than the `vk::Device`, you can assign the `vk::raii::Device` to a smart po std::unique_ptr pDevice; pDevice = std::make_unique( *pPhysicalDevice, deviceCreateInfo ); -Note that, as the vk::raii objects own the actual Vulkan resource, all vk::raii objects are moveable, but not copyable. +Note that the vk::raii objects own the actual Vulkan resource. Therefore, all vk::raii objects that own destructable resources are just movable, but not copyable. Therefore, a few vk::raii objects, like vk::raii::PhysicalDevice are copyable as well. For simplicity, in the rest of this document a vk::raii object is always directly instantiated on the stack. Obviously, that's not essential. You could assign them as well to a std::unique_ptr, a std::shared_ptr, or any other smart pointer or object managing data structure. And you can even assign them to a dumb pointer by using the new operator. -- 2.7.4