Added support for rendering to textures.