Moved setting of isftream locale to Model::readOBJ(..) and Model::readMTL(..).

This commit is contained in:
Robert Osfield
2020-01-17 09:07:58 +00:00
parent 396cfca1ae
commit b063f510c1
2 changed files with 4 additions and 5 deletions

View File

@@ -225,6 +225,8 @@ bool Model::readMTL(std::istream& fin)
{
OSG_INFO<<"Reading MTL file"<<std::endl;
fin.imbue(std::locale::classic());
const int LINE_SIZE = 4096;
char line[LINE_SIZE];
float r = 1.0f, g = 1.0f, b = 1.0f, a = 1.0f;
@@ -567,6 +569,8 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
{
OSG_INFO<<"Reading OBJ file"<<std::endl;
fin.imbue(std::locale::classic());
const int LINE_SIZE = 4096;
char line[LINE_SIZE];
float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;