-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.LoadTextureFromImage
JoeStrout edited this page Apr 29, 2026
·
3 revisions
Load a texture from image data NOTE: image is not unloaded, it must be done manually
| Parameter | Default Value | Note |
|---|---|---|
| image |
| Condition | Return Value |
|---|---|
| (always) | map |
img = raylib.LoadImage("sprite.png")
tex = raylib.LoadTextureFromImage(img)
raylib.UnloadImage img
if raylib.IsTextureValid(tex) then
raylib.DrawTexture tex, 0, 0, raylib.WHITE
raylib.UnloadTexture tex
end if