Beispiel #1
0
void loadObj( const std::string& filename )
{
    ObjParser parser;

    if (! parser.parseFile( filename ) )
    {
        std::cerr
                << "Failed to load .obj file: " << parser.errorText() << std::endl
                << "FILE: " << parser.filename()   << ":"
                << parser.lineNumber() << std::endl
                << "LINE: " << parser.lineText()   << std::endl;
    }
    else
    {
        std::cout << parser.dump();
    }
}