2
3
4
5
14
15
21
22
26
27
31
32
36
37
38
39
40
44
45
46
47
48
49
50
51 static bool WriteData(ktxTexture2* texture, uint32_t mipLevel,
const unsigned char* data, uint32_t size);
54
55
56
57
58
59 static bool SaveToDisk(ktxTexture2* texture,
const std::string& filePath);
62
63
64
65
66
67 static bool LoadFromKTX(
const std::string& filePath, ktxTexture2*& texture);
70
71
72
73
77
78
79
80
81
87
88
89
90
94
95
96
#define SPICES_PROFILE_ZONE
Texture2DCube Class. This class defines the basic behaves of Texture2DCube.
Texture2D Class. This class defines the basic behaves of texture2D.
static void Load(const std::string &fileName, Texture2DCube *outTexture)
Load image to a Texture2DCube object.
static void Load(const std::string &fileName, Texture2D *outTexture)
Load image to a Texture2D object.
static bool LoadSrc(const std::string &fileName, const std::string &it, Texture2D *outTexture, bool isCreateCompressTexture=true)
Function of load a src file.
static bool LoadBin(const std::string &fileName, const std::string &it, Texture2D *outTexture)
Function of load a ktx file.
TextureLoader Class. This class only defines static function for load data from image file.
static ktx_transcode_fmt_e GetAvailableTargetFormats()
Get available gpu compress format.
static ktx_size_t GetMipmapOffset(ktxTexture2 *texture, uint32_t mipLevel)
Get Mipmap data offset.
static bool FormatSupported(VkFormat format)
Check if the device supports sampling and transfers for the selected image.
Transcoder()=default
Constructor Function.
static bool SaveToDisk(ktxTexture2 *texture, const std::string &filePath)
Save a src image data to a ktx file.
static void Init()
Init basisu.
virtual ~Transcoder()=default
Destructor Function.
static bool WriteData(ktxTexture2 *texture, uint32_t mipLevel, const unsigned char *data, uint32_t size)
Write Data to ktxtexture.
static ktxTexture2 * CreateKTX2Texture(int &width, int &height)
Create a ktx2 Texture.
static bool DestroyktxTexture2(ktxTexture2 *texture)
Destroy a ktx file.
static bool LoadFromKTX(const std::string &filePath, ktxTexture2 *&texture)
Load a ktx file.
Transcoder of Texture Container format and Transform format and GPU compress format.
This Class is a Wrapper of VulkanBuffer.
static VulkanState & GetState()
Get VulkanState in use.
This class defines the render backend behaves of Vulkan.
const std::string binTexturePath
const std::string defaultTexturePath
Const variable: Original Image File Path.