functioning offscreen rendering