First version of FBO implementation.
Needs some more work, but it works.