Class VulkanTexture#

Inheritance Relationships#

Base Type#

Class Documentation#

class VulkanTexture : public TRAP::Graphics::Texture#

Public Functions

explicit VulkanTexture(std::string name)#

Constructor.

Parameters:

name – Name of the texture.

VulkanTexture(std::string name, std::vector<std::filesystem::path> filePaths)#

Constructor.

Parameters:
  • name – Name of the texture.

  • filePaths – File paths of the texture.

VulkanTexture(std::string name, std::vector<std::filesystem::path> filePaths, const TRAP::Optional<TextureCubeFormat> &cubeFormat)#

Constructor.

Parameters:
  • name – Name of the texture.

  • filePaths – File paths of the texture.

  • cubeFormat – Format for the cube texture.

~VulkanTexture() override#

Destructor.

consteval VulkanTexture(const VulkanTexture&) noexcept = delete#

Copy constructor.

consteval VulkanTexture &operator=(const VulkanTexture&) noexcept = delete#

Copy assignment operator.

VulkanTexture(VulkanTexture&&) noexcept = default#

Move constructor.

VulkanTexture &operator=(VulkanTexture&&) noexcept = default#

Move assignment operator.

virtual void Init(const RendererAPI::TextureDesc &desc) override#

Initialize the Texture.

Parameters:

descTexture description.

constexpr VkImageView GetSRVVkImageView() const noexcept#

Retrieve the read only color Vulkan image view handle of the texture.

Returns:

Vulkan image view handle.

constexpr VkImageView GetSRVStencilVkImageView() const noexcept#

Retrieve the read only stencil Vulkan image view handle of the texture.

Returns:

Vulkan image view handle.

constexpr const std::vector<VkImageView> &GetUAVVkImageViews() const noexcept#

Retrieve all read-writable Vulkan image view handles of the texture.

Returns:

Vulkan image view handles.

constexpr VkImage GetVkImage() const noexcept#

Retrieve the Vulkan image handle.

Returns:

Vulkan image handle.

constexpr bool IsLazilyAllocated() const noexcept#

Retrieve whether the texture is lazily allocated or not.

Returns:

True if the texture is lazily allocated, false otherwise.

Protected Functions

virtual void Shutdown() override#

Shutdown API dependent texture.