opengl: use buffer objects instead of host memory for subpictures

See bbbc51c713432b25b0ffdfa943b8441aa7d4f96e