We're now in a position to start rendering a 3D animation, and as with rendering a static 3D model it's also surprisingly easy to do.
Before we can use Marmalade's animation functionality, we first need to add the IwAnim API to our project. This API builds on top of the IwGraphics API required for rendering static 3D models.
As with all such Marmalade APIs, we add support for IwAnim to a project by listing iwanim
in the subprojects
section of the MKB file. We must then call IwAnimInit
after IwGraphicsInit
has
been called, and at shutdown time we need to call IwAnimTerminate
.
The GROUP file format comes to our rescue once again in order to get animation data loaded into memory. The export process will have created a GROUP file for us already that will include the GEO, MTL, SKEL, and SKIN files, so we just need to add entries for the ANIM files that we want to use.
With everything...