You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draw a part of a texture (defined by a rectangle)
Parameters
Parameter
Default Value
Note
texture
source
position
[0, 0]
tint
WHITE
Return value
None.
Notes
Example
tex=raylib.LoadTexture("spritesheet.png")
// Draw just the first 64x64 frame at position [0, 0]src= {x:0, y:0, width:64, height:64}
raylib.BeginDrawingraylib.ClearBackgroundraylib.BLACKraylib.DrawTextureRectex, src, [0, 0], raylib.WHITEraylib.EndDrawingraylib.UnloadTexturetex