code: func (gt *GLTriangles) SetLen(length int) {
  	switch {
  	case length > gt.Len():
  		needAppend := length - gt.Len()
  		for i := 0; i < needAppend; i++ {
  			gt.data = append(gt.data,
  				0, 0,
  				1, 1, 1, 1,
  				0, 0,
  				0,
  			)
  		}
  	case length < gt.Len():
  		gt.data = gt.data[:length*gt.vs.Stride()]
  	default:
  		return
  	}
  	mainthread.Call(func() {
  		gt.vs.Begin()
  		gt.vs.SetLen(length)
  		gt.vs.End()
  	})
  }
docs: // SetLen efficiently resizes GLTriangles to len.
  //
  // Time complexity is amortized O(1).