code: func (gt *GLTriangles) Update(t pixel.Triangles) {
  	if gt.Len() != t.Len() {
  		panic(fmt.Errorf("(%T).Update: invalid triangles len", gt))
  	}
  	gt.updateData(t)
  
  	// this code is supposed to copy the vertex data and CallNonBlock the update if
  	// the data is small enough, otherwise it'll block and not copy the data
  	if len(gt.data) < 256 { // arbitrary heurestic constant
  		data := append([]float32{}, gt.data...)
  		mainthread.CallNonBlock(func() {
  			gt.vs.Begin()
  			gt.vs.SetVertexData(data)
  			gt.vs.End()
  		})
  	} else {
  		mainthread.Call(func() {
  			gt.vs.Begin()
  			gt.vs.SetVertexData(gt.data)
  			gt.vs.End()
  		})
  	}
  }
docs: // Update copies vertex properties from the supplied Triangles into this GLTriangles.
  //
  // The two Triangles (gt and t) must be of the same len.