Float to int is slow on ppc. It requires a store, a big stall, and then a load. It's even worse on a G5 if the compiler is dumb (and let's face it, I'm using gcc here...). Just use lroundf when we want an int. It will certainly be no slower.
This commit is contained in:
@@ -208,7 +208,7 @@ void GLExt_t::Load( LowLevelWindow *pWind )
|
||||
else
|
||||
{
|
||||
const float fVersion = StringToFloat( pzVersion );
|
||||
m_iShadingLanguageVersion = int(roundf(fVersion * 100));
|
||||
m_iShadingLanguageVersion = lroundf( fVersion * 100 );
|
||||
/* The version string may contain extra information beyond the version number. */
|
||||
LOG->Info( "OpenGL shading language: %s", pzVersion );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user