Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Kulling
676ef9637b glFT2: Fix texture size in export. 2025-03-11 13:04:10 +01:00

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;