Added tangents to TriMesh and VBO classes. This allows the use of normal maps, bump maps and height maps on your model. A recalculateTangents() method is available to create the tangents from the existing normals and texture coordinates. The VBO binds the tangents to multi-texture coordinate slot 7, due to the lack of a pre-defined OpenGL keyword for tangents (see: section 2.7 of OpenGL's Vertex Specification). An alternative would be to use a vertex attribute instead.
I made sample, instead of a test application, because I liked the result too much :) It uses the new tangents from TriMesh and VboMesh to easily render normal mapped geometry using a basic shader. Let me know what you think.
* Fixed and added a few comments.
* Used VboMeshRef instead of VboMesh and restructured a bit of the code.
* Converted PNG to JPG for smaller file size.
Improved lighting on the model and added timers to the loader.
Reduced the size of the assets by removing the OBJ file, storing the mesh in binary format without normals and tangents, and resizing the JPG's as much as possible. Also added an animated light source and improved error handling.
Added copyright message, added emmisive map, reverted the mesh file because the generated normals didn't look good. Added comments.
Fixed the title from "Kobold" to "Goblin" (sorry!) and darkened the color of the rattle to make it look more like gold.
Auto fit values column in params window. That was a hard-to-find setting :S
applying tangents