// destroy destroys an OpenGL context and unlocks the current goroutine from // its os thread. func (c *contextGL) destroy() { C.CGLUnlockContext(c.ctx) C.CGLSetCurrentContext(nil) C.CGLDestroyContext(c.ctx) c.ctx = nil runtime.UnlockOSThread() }
// destroy destroys an OpenGL context and unlocks the current goroutine from // its os thread. func (c *contextGL) destroy() { C.CGLUnlockContext(c.ctx) C.CGLSetCurrentContext(nil) gl.ContextWatcher.OnDetach() C.CGLDestroyContext(c.ctx) c.ctx = nil runtime.UnlockOSThread() }