I'm creating a mesh loader for 3D games and fails me just loading the file.
I don't know why, but if I load a file of 1kb it loads perfectly and if is about 60kbs or above fails.
My impression is that the program haven't time enough to load the file, and when is_open() is requested returns error
Any suggestion?
I don't know why, but if I load a file of 1kb it loads perfectly and if is about 60kbs or above fails.
My impression is that the program haven't time enough to load the file, and when is_open() is requested returns error
Any suggestion?
Code:
fstream myfile;
myfile.open ("caixa.obj");
if (myfile.is_open())
{
while (! myfile.eof() )
{
...DoActions...
}
myfile.close();
}
else cout << "Unable to open file\n";
system("PAUSE");
return 0;