Added kludge to shift tex coords for bottom cap by one pixel to get rid of seam. power_of_two rewritten to use math instead of a while loop.

This commit is contained in:
Kyzentun Keeslala
2015-06-07 18:27:35 -06:00
parent 03407ef613
commit 771e24d1ca
2 changed files with 21 additions and 16 deletions
+2 -6
View File
@@ -179,12 +179,8 @@ float fmodfp(float x, float y)
int power_of_two( int iInput )
{
int iValue = 1;
while( iValue < iInput )
iValue <<= 1;
return iValue;
return static_cast<int>(powf(2.0f, ceilf(
log(static_cast<float>(iInput)) / log(2.0f))));
}
bool IsAnInt( const RString &s )