Fix mipmapping

This commit is contained in:
luisangelsm
2026-01-18 15:19:09 +01:00
parent 4e18fb69d7
commit 7384d50721
4 changed files with 21 additions and 26 deletions

View File

@ -40,8 +40,7 @@ void YACReaderPageFlow3D::updateImageData()
// Create QRhiTexture from the loaded image and queue the pixel upload
if (m_rhi) {
QRhiTexture *texture = m_rhi->newTexture(QRhiTexture::BGRA8, img.size(), 1,
(performance == high || performance == ultraHigh) ? QRhiTexture::MipMapped : QRhiTexture::UsedAsTransferSource);
QRhiTexture *texture = m_rhi->newTexture(QRhiTexture::BGRA8, img.size(), 1, QRhiTexture::MipMapped | QRhiTexture::UsedWithGenerateMips);
if (texture->create()) {
// Queue the image upload so it happens together with other resource updates
@ -52,8 +51,7 @@ void YACReaderPageFlow3D::updateImageData()
upload.y = 1 * (float(img.height()) / img.width());
pendingTextureUploads.append(upload);
QString s = "cover";
replace(s.toLocal8Bit().data(), texture, upload.x, upload.y, idx);
replace(texture, upload.x, upload.y, idx);
}
}
}