Пример #1
0
// 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()
}
Пример #2
0
// 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()
}