Пример #1
0
func showWindow(w *windowImpl) {
	w.glctxMu.Lock()
	w.glctx, w.worker = gl.NewContext()
	w.glctxMu.Unlock()

	C.doShowWindow(C.uintptr_t(w.id))
}
Пример #2
0
func showWindow(w *windowImpl) {
	retc := make(chan uintptr)
	uic <- uiClosure{
		f: func() uintptr {
			return uintptr(C.doShowWindow(C.uintptr_t(w.id)))
		},
		retc: retc,
	}
	w.ctx = <-retc
	w.glctxMu.Lock()
	w.glctx, w.worker = glctx, worker
	w.glctxMu.Unlock()
	go drawLoop(w)
}