factor out offline gl context to its own class, boilerplate for circlepack effect