glFT2: Fix texture size in export.

This commit is contained in:
Kim Kulling
2025-03-11 13:04:10 +01:00
parent 70459b4d1f
commit 676ef9637b

View File

@@ -614,6 +614,8 @@ void glTF2Exporter::GetMatTex(const aiMaterial &mat, Ref<Texture> &texture, unsi
// The asset has its own buffer, see Image::SetData
// basisu: "image/ktx2", "image/basis" as is
const size_t length = curTex->mWidth * curTex->mHeight;
//texture->source->SetData(reinterpret_cast<uint8_t *>(curTex->pcData), length, *mAsset);
texture->source->SetData(reinterpret_cast<uint8_t *>(curTex->pcData), curTex->mWidth, *mAsset);
} else {
texture->source->uri = path;