http://developer.apple.com/iphone/library/samplecode/AQOfflineRenderTest/index.html