title: Assimp Faces all have indices (0,1,2)
body: <p>I'm using Assimp to load in OBJ files to render in OpenGL using my own rendering pipeline.</p>
  
  <p>But when I load in a file, <em>every</em> face has indices (0,1,2), rather than appropriate entries into the vertex array.</p>
  
  <p>Every example I could find does something similar to this (which is what I'm doing):</p>
  
  <pre><code>for (size_t k = 0; k&lt;mesh-&gt;mNumFaces; ++k)
  {
      if (mesh-&gt;mFaces-&gt;mNumIndices == 3)
      {
          out.index_list.push_back(mesh-&gt;mFaces-&gt;mIndices[0]);
          out.index_list.push_back(mesh-&gt;mFaces-&gt;mIndices[1]);
          out.index_list.push_back(mesh-&gt;mFaces-&gt;mIndices[2]);
      }
      else
      {
          std::cout &lt;&lt; "wierd number of indices to a face: " &lt;&lt; mesh-&gt;mFaces-&gt;mNumIndices &lt;&lt; std::endl;
      }
  }
  </code></pre>
  
  <p>or this (which I've tried, and is <em>very</em> wrong):</p>
  
  <pre><code>for (size_t k = 0; k&lt;mesh-&gt;mNumFaces; ++k)
  {
      if (mesh-&gt;mFaces-&gt;mNumIndices == 3)
      {
          out.index_list.push_back(mesh-&gt;mFaces-&gt;mIndices[0]+k*3);
          out.index_list.push_back(mesh-&gt;mFaces-&gt;mIndices[1]+k*3);
          out.index_list.push_back(mesh-&gt;mFaces-&gt;mIndices[2]+k*3);
      }
      else
      {
          std::cout &lt;&lt; "wierd number of indices to a face: " &lt;&lt; mesh-&gt;mFaces-&gt;mNumIndices &lt;&lt; std::endl;
      }
  }
  </code></pre>
  
  <p>I've also tried some variations based on the relative number of vertexes and faces in a mesh, guessing that it should be a triangle strip, etc... and that also isn't working.</p>
  
  <p>Example:</p>
  
  <pre><code>if (mesh-&gt;mNumFaces == mesh-&gt;mNumVertices-2)
      for (size_t k = 0; k&lt;mesh-&gt;mNumVertices-2; ++k)
      {
          if (k%2)
          {
              out.index_list.push_back(k+1);
              out.index_list.push_back(k+0);
              out.index_list.push_back(k+2);
          }
          else
          {
              out.index_list.push_back(k+0);
              out.index_list.push_back(k+1);
              out.index_list.push_back(k+2);
          }
      }
  else if...
  </code></pre>
  
  <p>I'm obviously missing something very basic and obvious here, but I can't see what it is.</p>