NewTextureResource sends the image to the GPU and returns a `TextureResource` for easy access
(img Image)
| 120 | |
| 121 | // NewTextureResource sends the image to the GPU and returns a `TextureResource` for easy access |
| 122 | func NewTextureResource(img Image) TextureResource { |
| 123 | id := UploadTexture(img) |
| 124 | return TextureResource{Texture: id, Width: float32(img.Width()), Height: float32(img.Height())} |
| 125 | } |
| 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 { |
no test coverage detected