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
Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) NOTE: Previous texture should be manually unloaded
Parameters
Parameter
Default Value
Note
material
mapType
texture
Return value
None.
Notes
Example
mat=raylib.LoadMaterialDefaulttex=raylib.LoadTexture("diffuse.png")
raylib.SetMaterialTexturemat, raylib.MATERIAL_MAP_DIFFUSE, tex// mat now uses tex as its diffuse textureraylib.UnloadMaterialmatraylib.UnloadTexturetex