You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently, manually setting data when creating KTX files from my application:
ktxTexture2 *texture = nullptr;
auto res = ktxTexture2_Create(&createInfo, KTX_TEXTURE_CREATE_ALLOC_STORAGE, &texture);
// Need to cast it to ktxTexture to be able to use the functions below
auto *baseTexture = reinterpret_cast<ktxTexture *>(texture);
ktxTexture_SetImageFromMemory(
baseTexture, 0, 0, 0, static_cast<const ktx_uint8_t *>(asset.data.data),
asset.size);
ktxTexture_WriteToNamedFile(baseTexture, assetPath.string().c_str());
How am I supposed to generate the mip levels for the texture when I am setting the image memory manually? Is this value only used when loading the KTX2 file?
The text was updated successfully, but these errors were encountered:
libktx does not contain code for resampling images. Open issue #464 is for adding this.
Currently you have to create the mip level images yourself and then set them into the ktxTexture by calling ktxTexture_SetImageFromMemory for each one using the level parameter to tell it which level you are providing.
I am currently, manually setting data when creating KTX files from my application:
How am I supposed to generate the mip levels for the texture when I am setting the image memory manually? Is this value only used when loading the KTX2 file?
The text was updated successfully, but these errors were encountered: