tp::Image class

Represents a multidimensional array of data interpreted as textures or attachments.

They are not used directly, but instead are passed to commands or descriptors through tp::ImageView objects that view a contiguous range of its data.

Base classes

class Ownable
A customizable base class that is used for objects returned by the API in an OwningPtr.

Constructors, destructors, conversion operators

operator const ImageView&() const
Casting operator returning the default tp::ImageView object.

Public functions

auto createView(ImageViewSetup viewSetup) -> ImageView
Creates a view of the specified range of the image data.
auto getDefaultView() const -> const ImageView&
Returns the default tp::ImageView object that views the entire image subresource range with the same format and an identity component mapping.
auto getExtent(uint32_t mipLevel = 0) const -> Extent3D
Returns the extent of a specific mip level of the image.
auto getFormat() const -> Format
Returns the format of the image.
auto getMemoryLocation() const -> MemoryLocation
Returns the memory location that the image has been allocated from.
auto getSampleLevel() const -> MultisampleLevel
Returns the multisampling level of the image.
auto getType() const -> ImageType
Returns the type of the image.
auto getWholeRange() const -> ImageSubresourceRange
Returns the image subresource range encompassing the entire range of the image.
auto vkGetImageHandle() const -> VkImageHandle
Returns the associated VkImage handle.
auto vmaGetMemoryAllocationHandle() const -> VmaAllocationHandle
Returns the associated <a href='https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/struct_vma_allocation.html">VmaAllocation handle.

Function documentation

tp::Image::operator const ImageView&() const

Casting operator returning the default tp::ImageView object.

ImageView tp::Image::createView(ImageViewSetup viewSetup)

Creates a view of the specified range of the image data.

Parameters
viewSetup The setup structure describing the view.