Class Texture#

Class Documentation#

class Texture#

Public Functions

Texture()#
Texture(const Texture&) = delete#
Texture &operator=(const Texture&) = delete#
Texture(Texture &&other) noexcept#
Texture &operator=(Texture &&other) noexcept#
bool createFromFile(std::shared_ptr<VulkanDevice> device, vk::CommandPool commandPool, const std::string &fileName)#
void createDefaultTexture(std::shared_ptr<VulkanDevice> device, vk::CommandPool commandPool)#
void setImage(vk::Image image)#
void setImageView(vk::ImageView imageView)#
inline uint32_t getMipLevel() const#
inline VulkanImage &getVulkanImage()#
inline VulkanImageView &getVulkanImageView()#
inline vk::Image &getImage()#
inline vk::ImageView &getImageView()#
inline vk::Sampler &getSampler()#
void createImage(std::shared_ptr<VulkanDevice> device, uint32_t width, uint32_t height, uint32_t in_mip_levels, vk::Format format, vk::ImageTiling tiling, vk::ImageUsageFlags use_flags, vk::MemoryPropertyFlags prop_flags, uint32_t array_layers = 1, vk::ImageCreateFlags create_flags = {}, vk::ImageType image_type = vk::ImageType::e2D, uint32_t depth = 1)#
void createImageView(std::shared_ptr<VulkanDevice> device, vk::Format format, vk::ImageAspectFlags aspect_flags, uint32_t in_mip_levels, vk::ImageViewType view_type = vk::ImageViewType::e2D, uint32_t array_layers = 1)#
void createTextureSampler(std::shared_ptr<VulkanDevice> device, vk::Filter filter = vk::Filter::eLinear, vk::SamplerAddressMode addressMode = vk::SamplerAddressMode::eRepeat)#
void cleanUp()#
~Texture()#