Converted OpenGL version number code to using osg::asciiToFloat to avoid issues with conversion using locale senstive atof function

This commit is contained in:
Robert Osfield
2008-11-24 13:19:01 +00:00
parent bf8c3cc07e
commit fccd05b290
4 changed files with 6 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ float osg::getGLVersionNumber()
if (!versionstring) return 0.0;
std::string vs( versionstring );
return( atof( vs.substr( 0, vs.find( " " ) ).c_str() ) );
return( asciiToFloat( vs.substr( 0, vs.find( " " ) ).c_str() ) );
}
bool osg::isExtensionInExtensionString(const char *extension, const char *extensionString)