Load an image file into a DX11 texture.
Susano.LoadTexture(path) -> number, number, number
path (string): File path (PNG, JPG/JPEG, BMP, GIF*, TGA).
path
texId (number): Texture handle.
texId
w (number): Width in pixels.
w
h (number): Height in pixels.
h
Decodes via stb_image to RGBA8, uploads to a Shader Resource View.
stb_image
GIF*: only the first frame is loaded (no animation).
Keep texId until you call Susano.ReleaseTexture.
Susano.ReleaseTexture
Last updated 2 months ago
local id, w, h = Susano.LoadTexture("logo.png")