|
From: James W. W. <ja...@wr...> - 2004-12-17 22:31:40
|
In ir_texture_convert_mipmap, we have:
// Work out how many images are contained in the mipmap
if (theMipmap.useMipmapping)
{
numImages = 0;
n = E3Num_Min(theMipmap.mipmaps[0].width,
theMipmap.mipmaps[1].height);
while (n > 1)
{
n /= 2;
numImages += 1;
}
}
else
numImages = 1;
This caught my attention because the subscript [1] for the height
seemed out of place. But even if the width were the limiting factor,
the formula seems wrong. For instance suppose we start with n = 5.
The first time through the loop, n becomes 2 and numImages becomes 1.
The second pass makes n become 1 and numImages become 2, and then we
exit the loop. But numImages should be 3: sizes 5, 2, and 1.
--
James W. Walker, ScriptPerfection Enterprises, Inc.
<http://www.write-brain.com/>
|