Copy OffscreenGLContext from MTsim branch because it has bugfixes