CopyToBytes copies bytes from val to given source pointer into memory. Use this for struct data types to retrieve computed results.
(srcPtr unsafe.Pointer)
| 196 | // CopyToBytes copies bytes from val to given source pointer into memory. |
| 197 | // Use this for struct data types to retrieve computed results. |
| 198 | func (vl *Value) CopyToBytes(srcPtr unsafe.Pointer) { |
| 199 | if err := vl.PaddedArrayCheck(); err != nil { |
| 200 | log.Println(err) |
| 201 | return |
| 202 | } |
| 203 | dst := vl.Bytes() |
| 204 | src := (*[ByteCopyMemoryLimit]byte)(srcPtr)[:vl.AllocSize] |
| 205 | copy(src, dst) |
| 206 | } |
| 207 | |
| 208 | // SetGoImage sets Texture image data from an *image.RGBA standard Go image, |
| 209 | // at given layer, and sets the Mod flag, so it will be sync'd by Memory |
no test coverage detected