There is a Wwdc session that covers just that. 2012 Session 511 (near the end). Basically what you want to do:
-Create output texture
-Make output framebuffer target texture
- bind the texture framebuffer to the output instead of the screen
-Now use drawImage: inRect: fromRect: for writing directly to a texture.
source share