an example of beautiful code using bottom up design.
with this method, you start with the lowest level stuff, then add higher level layers until you have a sufficiently high level API.
so you go from ugly low level stuff to a beautiful high level API.
This example uses the directx 9 skinned mesh code from tiny.cpp and DXUT.h macros at the low level:
probably not what most folks would call beautiful code. but that's the low level API i had to start with.
first step was a wrapper layer API to "beautify" things a bit:
a little better, but still kind of ugly, given all the various routines for the different skinning methods. it should really be split up into separate API's, one for each skinning method.
mesh and controller pools were required. being new APIs, they turned out to be relatively simple and beautiful:
and finally, one routine to rule them all: draw_skinmesh_caveman
so all that ugly code has been beautified into the single API call draw_skinmesh_caveman