andreucm - 2014-03-10

Dear all,

I'm trying (yet!) to import and render models. Inspired from the file Sample_SimpleOpenGL.c (provided in the samples folder) , my code tries to draw all the scene based on recursive rendering, using openGL.

However, for the node just after the root one, I found that the variable nd->mNumMeshes is !=0, so we enter to the "for" loop to run over all meshes:

  for (; n < nd->mNumMeshes; ++n)
  {
     const struct aiMesh* mesh = sc->mMeshes[nd->mMeshes[n]];

     // more stuff
  }

just after setting mesh pointer to first address value (n=0), we check for mesh->mNumFaces, and it has a positive value (180), but the pointer array to the first of these faces (&mesh->mFaces[0]) is NULL, while the other pointers in the array store values too low to be valid pointers. I check with a call to mesh->HasFaces(), and it returns false, which is quite confusing since the mesh had 180 faces.

So it seems that this array of pointers to faces has not been set properly in the import function.

Does anyone have an advice, or an idea to check, or somewhere to pull ?

Thanks in advance,

andreu