func showWindow(w *windowImpl) { w.glctxMu.Lock() w.glctx, w.worker = gl.NewContext() w.glctxMu.Unlock() // Show makes an initial call to sizeEvent (via win32.SizeEvent), where // we setup the EGL surface and GL context. win32.Show(syscall.Handle(w.id)) }
func (s *screenImpl) NewWindow(opts *screen.NewWindowOptions) (screen.Window, error) { w := &windowImpl{} var err error w.hwnd, err = win32.NewWindow(opts) if err != nil { return nil, err } s.mu.Lock() s.windows[w.hwnd] = w s.mu.Unlock() win32.Show(w.hwnd) return w, nil }