C++ 如何使用ASIMP和opengl显示三维对象

C++ 如何使用ASIMP和opengl显示三维对象,c++,qt,3d,C++,Qt,3d,我使用ASSIMP,OpenGL C++从.off文件中读取和显示3D对象。 以下代码用于读取.off文件 void MainWindow::OpenOFF(string path) { Assimp::Importer importer; std::ifstream in(path); if(!in.fail()) { in.close(); } else{ cout<<"Couldn't op

我使用ASSIMP,OpenGL C++从.off文件中读取和显示3D对象。 以下代码用于读取.off文件

    void MainWindow::OpenOFF(string path)

{

 Assimp::Importer importer;

      std::ifstream in(path);

    if(!in.fail()) {
        in.close();
    }
    else{
    cout<<"Couldn't open file: %s\n"<< path.c_str();
   cout<<"%s\n"<< importer.GetErrorString();
    }


 const aiScene *scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_FlipUVs);
      if (!scene || scene->mFlags == AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode) // if is Not    Zero
     {
      cout << "ERROR::ASSIMP:: " << importer.GetErrorString() << endl;
     return;
      }

 }
void主窗口::OpenOFF(字符串路径)
{
助理:进口商;
std::ifstream-in(路径);
如果(!in.fail()){
in.close();
}
否则{
库特