title: OpenGL skeleton animation
body: <p>I am trying to add animation to my program.</p>
  
  <p>I have human model created in Blender with skeletal animation, and I can skip through the keyframes to see the model walking.</p>
  
  <p>Now I've exported the model to an XML (Ogre3D) format, and in this XML file I can see the rotation, translation and scale assigned to each bone at a specific time (t=0.00000, t=0.00040, ... etc.)</p>
  
  <p>What I've done is found which vertices are assigned each bone. Now I'm assuming all I need to do is apply the transformations defined for the bone to each one of these vertices. Is this the correct approach?</p>
  
  <p>In my OpenGL draw() function (rough pseudo-code):</p>
  
  <pre><code>for (Bone b : bones){
      gl.glLoadIdentity();
  
      List&lt;Vertex&gt; v= b.getVertices();
      rotation = b.getRotation();
      translation = b.getTranslation();
      scale = b.getScale();
  
      gl.glTranslatef(translation);
      gl.glRotatef(rotation);
      gl.glScalef(scale);
  
      gl.glDrawElements(v);
   }
  </code></pre>