Removed log2 and replaced the places where is was used with a new Image::computeNumberOfMipmapLevels method.
This commit is contained in:
@@ -464,7 +464,7 @@ void Texture2DArray::allocateMipmap(State& state) const
|
||||
// compute number of mipmap levels
|
||||
int width = _textureWidth;
|
||||
int height = _textureHeight;
|
||||
int numMipmapLevels = 1 + (int)floor(log2(maximum(width, height)));
|
||||
int numMipmapLevels = Image::computeNumberOfMipmapLevels(width, height);
|
||||
|
||||
// we do not reallocate the level 0, since it was already allocated
|
||||
width >>= 1;
|
||||
|
||||
Reference in New Issue
Block a user