29 static std::shared_ptr<ImageCube>
Create(
const Node& node);
41 static std::shared_ptr<ImageCube>
42 Create(
const VirtualPath& assetPath,
const std::string& fileSuffix, VkFilter filter = VK_FILTER_LINEAR,
43 VkSamplerAddressMode addressMode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
bool anisotropic =
true,
57 VkFilter filter = VK_FILTER_LINEAR,
58 VkSamplerAddressMode addressMode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
59 bool anisotropic =
true,
bool mipmap =
true,
bool load =
true);
73 explicit ImageCube(
const glm::uvec2& extent, VkFormat format = VK_FORMAT_R8G8B8A8_UNORM,
74 VkImageLayout layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
75 VkImageUsageFlags usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_STORAGE_BIT,
76 VkFilter filter = VK_FILTER_LINEAR,
77 VkSamplerAddressMode addressMode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
78 VkSampleCountFlagBits samples = VK_SAMPLE_COUNT_1_BIT,
bool anisotropic =
false,
93 explicit ImageCube(std::unique_ptr<Bitmap>&& bitmap, VkFormat format = VK_FORMAT_R8G8B8A8_UNORM,
94 VkImageLayout layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
95 VkImageUsageFlags usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_STORAGE_BIT,
96 VkFilter filter = VK_FILTER_LINEAR,
97 VkSamplerAddressMode addressMode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
98 VkSampleCountFlagBits samples = VK_SAMPLE_COUNT_1_BIT,
bool anisotropic =
false,
106 std::unique_ptr<Bitmap>
GetBitmap(uint32_t mipLevel = 0)
const;
114 void SetPixels(
const uint8_t* pixels, uint32_t layerCount, uint32_t baseArrayLayer);
125 const std::string& GetFileSuffix()
const
129 const std::vector<std::string>& GetFileSides()
const
133 bool IsAnisotropic()
const
135 return m_Anisotropic;
137 bool IsMipmap()
const
141 uint32_t GetComponents()
const
147 friend const Node& operator>>(
const Node& node,
ImageCube& image);
148 friend Node& operator<<(Node& node,
const ImageCube& image);
150 void Load(std::unique_ptr<Bitmap> loadBitmap =
nullptr);
153 VirtualPath m_AssetPath;
154 std::string m_FileSuffix;
156 std::vector<std::string> m_FileSides = {
"Right",
"Left",
"Top",
"Bottom",
"Back",
"Front" };
160 uint32_t m_Components = 0;
ImageCube(const VirtualPath &assetPath, std::string fileSuffix=".png", VkFilter filter=VK_FILTER_LINEAR, VkSamplerAddressMode addressMode=VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, bool anisotropic=true, bool mipmap=true, bool load=true)
Definition ImageCube.cpp:36