Texture

A static image loaded into GPU memory, typically from a file. Once loaded, it can be used multiple times for efficient rendering. Cannot be modified after creation - for dynamic textures that can be drawn to, see [RenderTexture] instead.

load! : Str => Result Texture [LoadErr Str]

Load a texture from a file.

texture = Texture.load! "sprites.png"