Added functionality to render directly to the window