|
@@ -327,7 +327,10 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
|
|
|
|
|
|
mNumMipLevels++;
|
|
|
allocPixels += currWidth * currHeight * mBytesPerPixel;
|
|
|
- } while (currWidth != 1 && currHeight != 1);
|
|
|
+ } while (currWidth != 1 || currHeight != 1);
|
|
|
+
|
|
|
+ U32 expectedMips = mFloor(mLog2(mMax(in_width, in_height))) + 1;
|
|
|
+ AssertFatal(mNumMipLevels == expectedMips, "GBitmap::allocateBitmap: mipmap count wrong");
|
|
|
}
|
|
|
AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels");
|
|
|
|