mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
commit
91a5d82af5
1 changed files with 0 additions and 8 deletions
|
@ -171,14 +171,6 @@ gpu::Texture* TextureUsage::process2DTextureColorFromImage(const QImage& srcImag
|
|||
|
||||
if (generateMips) {
|
||||
theTexture->autoGenerateMips(-1);
|
||||
auto levels = theTexture->maxMip();
|
||||
uvec2 size(image.width(), image.height());
|
||||
for (uint8_t i = 1; i <= levels; ++i) {
|
||||
size >>= 1;
|
||||
size = glm::max(size, uvec2(1));
|
||||
image = image.scaled(size.x, size.y, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
theTexture->assignStoredMip(i, formatMip, image.byteCount(), image.constBits());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue