class
#include <VaultedVulkan/VV_Resource.hpp>
Image Images represent multidimensional - up to 3 - arrays of data which can be used for various purposes (e.g. attachments, textures), by binding them to a graphics or compute pipeline via descriptor sets, or by directly specifying them as parameters to certain commands.
Contents
This object represents a device created object on the host. As such ownership is tied to this host object. Due to this design, the object has no copy-construction allowed. Instead, default move constructor and assignment has been defined.
Note: If the image belongs to a swapchain, the swapchain handles the objects lifetime and should not be destroyed by this object, instead Clear() should be called before object's destruction to make sure that the device object is destroyed by this host object.
Base classes
- struct VV::V2::Image
- Images represent multidimensional - up to 3 - arrays of data which can be used for various purposes (e.g. attachments, textures), by binding them to a graphics or compute pipeline via descriptor sets, or by directly specifying them as parameters to certain commands.
Public types
Constructors, destructors, conversion operators
- Image()
- Default constructor.
- Image(const LogicalDevice& _device)
- Specifies logical device.
-
Image(const LogicalDevice& _device,
const Memory::
AllocationCallbacks& _allocator) - Specifies logical device and allocator.
- Image(Image&& _other) noexcept
- Performs a move operation to transfer ownership of the device object to this host object.
- ~Image()
- Destroy the image if the handle is not null.
- operator Handle&()
- Implicit conversion to give a reference to its handle.
- operator const Handle&() const
- Implicit conversion to give a readonly reference to its handle.
- operator const Handle*() const
- Implicit conversion to give a pointer to its handle.
Public functions
- void Assign(const LogicalDevice& _device, Handle _handle)
- Assign the logical device and handle.
- void Clear()
- Clear the logical device and handle.
- auto BindMemory(const Memory& _memory, DeviceSize _memoryOffset) -> EResult
- auto Create(const CreateInfo& _info) -> EResult
- Create an image.
- auto Create(const LogicalDevice& _device, const CreateInfo& _info) -> EResult
- Create an image (logical device specified).
-
auto Create(const LogicalDevice& _device,
const CreateInfo& _info,
const Memory::
AllocationCallbacks& _allocator) -> EResult - Create an image (logical device and allocator specified).
- void Destroy()
- Destroy an image.
- auto GetMemoryRequirements() const -> const Memory::Requirements&
- Provides the memory requirements.
- auto operator==(const Image& _other) const -> bool
- Checks to see if its the same object by checking to see if its the same handle.
- auto operator=(Image&& _other) -> Image& noexcept
- Performs a move assignment operation to transfer ownership of the device object to this host object.
Protected variables
- Handle handle
-
const Memory::
AllocationCallbacks* allocator - const LogicalDevice* device
- Memory::Requirements memoryRequirements