NewTextureSingle sends the image to the GPU and returns a `Texture` with a viewport for single-sprite images
(img Image)
| 126 | |
| 127 | // NewTextureSingle sends the image to the GPU and returns a `Texture` with a viewport for single-sprite images |
| 128 | func NewTextureSingle(img Image) Texture { |
| 129 | id := UploadTexture(img) |
| 130 | return Texture{id, float32(img.Width()), float32(img.Height()), engo.AABB{Max: engo.Point{X: 1.0, Y: 1.0}}} |
| 131 | } |
| 132 | |
| 133 | // ImageToNRGBA takes a given `image.Image` and converts it into an `image.NRGBA`. Especially useful when transforming |
| 134 | // image.Uniform to something usable by `engo`. |
no test coverage detected