don't set pgl to null for offscreen surfaces.