There is no way I could have gone forward with adding an animation system to my engine without being able to import data from file exported from Maya or other similar software. Can you imagine hard coding mesh data for complex meshes like the one I've shown in this post? (I have and I don't EVER want to think about it again).
I used an open source library called Assimp to help me with extracting data from these maya files, this is the same library used by the tutorial I'm following. Now there are advantages and disadvantages to using Assimp: it abstracts most of the hard work of reading and parsing .obj or .fbx files but I need to tailor my data structures and classes to the way the library interprets the data. From what I can tell, Assimp takes a single model and splits it into multiple smaller meshes based on the material properties on that part of the model. So I ended up changing my Actor class to support multiple meshes and materials. Calling draw on an actor cycles through all the meshes and individually draws them using the right material. I realize this is a horrible way of doing things but at this point I was just trying to get through the importing part so that I could finally start working on my building my animation system.
Once I changed this I realized that I had to add reference counting to the classes like Mesh, Texture, Material etc that are created dynamically and owned by other classes like Actor. To test out my reference counting, I add some code to check for memory leaks; lo and behold I was leaking memory out of the wazoo! It took me a few hours of investigating and I was able to figure out that all the leaks were Texture object that were not being released. After snooping around a bit more I realized that there was a fundamental flaw in my reference counting code (wrapping around of an unsigned integer) that was leading to the pointer not getting deleted. Here's the fixed reference counting code.
The reference counting system is based off another system I've seen used by one of my professors in College. Now that the bugs were sorted I could finally import a complex mesh with multiple materials and render it. I chose the same model used in the tutorial I'm following, the scene contains a directional light source and two point light sources.