SetGoImage calls SetGoImage on the proper Texture value for given index. if TexSzAlloc.On via AllocTexBySize then this is routed to the actual allocated image array, otherwise it goes directly to the standard Value. SetGoImage sets staging image data from a standard Go image at given layer. This is
(idx int, img image.Image, flipy bool)
| 465 | // Must still call AllocImage to have image allocated on the device, |
| 466 | // and copy from this host staging data to the device. |
| 467 | func (vs *Values) SetGoImage(idx int, img image.Image, flipy bool) { |
| 468 | if !vs.TexSzAlloc.On || vs.GpTexValues == nil { |
| 469 | vl := vs.Values[idx] |
| 470 | vl.SetGoImage(img, 0, flipy) |
| 471 | return |
| 472 | } |
| 473 | idxs := vs.TexSzAlloc.ItemIndexes[idx] |
| 474 | vl := vs.GpTexValues[idxs.GpIndex] |
| 475 | vl.SetGoImage(img, idxs.ItemIndex, flipy) |
| 476 | } |
| 477 | |
| 478 | //////////////////////////////////////////////////////////////// |
| 479 | // Texture val functions |
nothing calls this directly
no test coverage detected