Added functionality to render to texture (WIP)