ConfigGoImage configures the image for storing an image of the given size, for images allocated in a shared host buffer. (i.e., not Var.TextureOwns). Image format will be set to default unless format is already set. Layers is number of separate images of given size allocated in a texture array. On
(sz image.Point, layers int)
| 501 | // Once memory is allocated then SetGoImage can be called in a |
| 502 | // second pass. |
| 503 | func (im *Image) ConfigGoImage(sz image.Point, layers int) { |
| 504 | if im.Format.Format != vk.FormatR8g8b8a8Srgb { |
| 505 | im.Format.Defaults() |
| 506 | } |
| 507 | im.Format.Size = sz |
| 508 | if layers <= 0 { |
| 509 | layers = 1 |
| 510 | } |
| 511 | im.Format.Layers = layers |
| 512 | } |
| 513 | |
| 514 | const ( |
| 515 | // FlipY used as named arg for flipping the Y axis of images, etc |
no test coverage detected