Use externalGLControl and externalGLContext.