code: func (w *Window) Update() {
  	mainthread.Call(func() {
  		_, _, oldW, oldH := intBounds(w.bounds)
  		newW, newH := w.window.GetSize()
  		w.bounds = w.bounds.ResizedMin(w.bounds.Size().Add(pixel.V(
  			float64(newW-oldW),
  			float64(newH-oldH),
  		)))
  	})
  
  	w.canvas.SetBounds(w.bounds)
  
  	mainthread.Call(func() {
  		w.begin()
  
  		framebufferWidth, framebufferHeight := w.window.GetFramebufferSize()
  		glhf.Bounds(0, 0, framebufferWidth, framebufferHeight)
  
  		glhf.Clear(0, 0, 0, 0)
  		w.canvas.gf.Frame().Begin()
  		w.canvas.gf.Frame().Blit(
  			nil,
  			0, 0, w.canvas.Texture().Width(), w.canvas.Texture().Height(),
  			0, 0, framebufferWidth, framebufferHeight,
  		)
  		w.canvas.gf.Frame().End()
  
  		if w.vsync {
  			glfw.SwapInterval(1)
  		} else {
  			glfw.SwapInterval(0)
  		}
  		w.window.SwapBuffers()
  		w.end()
  	})
  
  	w.UpdateInput()
  }
docs: // Update swaps buffers and polls events. Call this method at the end of each frame.