switch to passing the render window to `render`

Similar to https://github.com/PistonDevelopers/piston/issues/498, this patch passes the render window into the render function.