mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 13:52:49 +02:00
Properly track the max mip
This commit is contained in:
parent
9ed1a5980a
commit
7fb1315945
1 changed files with 2 additions and 0 deletions
|
@ -363,6 +363,7 @@ bool Texture::assignStoredMip(uint16 level, const Element& format, Size size, co
|
|||
Size expectedSize = evalStoredMipSize(level, format);
|
||||
if (size == expectedSize) {
|
||||
_storage->assignMipData(level, format, size, bytes);
|
||||
_maxMip = std::max(_maxMip, level);
|
||||
_stamp++;
|
||||
return true;
|
||||
} else if (size > expectedSize) {
|
||||
|
@ -371,6 +372,7 @@ bool Texture::assignStoredMip(uint16 level, const Element& format, Size size, co
|
|||
// We should probably consider something a bit more smart to get the correct result but for now (UI elements)
|
||||
// it seems to work...
|
||||
_storage->assignMipData(level, format, size, bytes);
|
||||
_maxMip = std::max(_maxMip, level);
|
||||
_stamp++;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue