mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Fix mipmapping
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user