Fix an issue when calculating the number of mipmaps for a volume/3D texture.

This commit is contained in:
Alex Szpakowski
2018-01-06 01:55:09 -04:00
parent 08b3635e4e
commit 6808968893
4 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -307,12 +307,12 @@ bool Texture::validateFilter(const Filter &f, bool mipmapsAllowed)
return true;
}
int Texture::getMipmapCount(int w, int h)
int Texture::getTotalMipmapCount(int w, int h)
{
return (int) log2(std::max(w, h)) + 1;
}
int Texture::getMipmapCount(int w, int h, int d)
int Texture::getTotalMipmapCount(int w, int h, int d)
{
return (int) log2(std::max(std::max(w, h), d)) + 1;
}