Make terrain texture settings global, add dialog to painter

This commit is contained in:
Lukas Aldershaab 2021-01-03 00:50:42 +01:00
parent d3996aec84
commit db496fa0c4
10 changed files with 483 additions and 317 deletions

View file

@ -319,7 +319,7 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
U32 currWidth = in_width;
U32 currHeight = in_height;
do
while (currWidth != 1 || currHeight != 1)
{
mMipLevelOffsets[mNumMipLevels] = mMipLevelOffsets[mNumMipLevels - 1] +
(currWidth * currHeight * mBytesPerPixel);
@ -330,7 +330,7 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
mNumMipLevels++;
allocPixels += currWidth * currHeight * mBytesPerPixel;
} while (currWidth != 1 || currHeight != 1);
}
U32 expectedMips = mFloor(mLog2(mMax(in_width, in_height))) + 1;
AssertFatal(mNumMipLevels == expectedMips, "GBitmap::allocateBitmap: mipmap count wrong");