added offscreen rendering stuff