Add DrawTextureTiled, fixes #170
This commit is contained in:
parent
b144285481
commit
7b9bbbba96
1 changed files with 12 additions and 0 deletions
|
@ -632,3 +632,15 @@ func DrawTexturePro(texture Texture2D, sourceRec, destRec Rectangle, origin Vect
|
||||||
ctint := colorCptr(tint)
|
ctint := colorCptr(tint)
|
||||||
C.DrawTexturePro(*ctexture, *csourceRec, *cdestRec, *corigin, crotation, *ctint)
|
C.DrawTexturePro(*ctexture, *csourceRec, *cdestRec, *corigin, crotation, *ctint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DrawTextureTiled - Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest
|
||||||
|
func DrawTextureTiled(texture Texture2D, sourceRec, destRec Rectangle, origin Vector2, rotation float32, scale float32, tint color.RGBA) {
|
||||||
|
ctexture := texture.cptr()
|
||||||
|
csourceRec := sourceRec.cptr()
|
||||||
|
cdestRec := destRec.cptr()
|
||||||
|
corigin := origin.cptr()
|
||||||
|
crotation := (C.float)(rotation)
|
||||||
|
cscale := (C.float)(scale)
|
||||||
|
ctint := colorCptr(tint)
|
||||||
|
C.DrawTextureTiled(*ctexture, *csourceRec, *cdestRec, *corigin, crotation, cscale, *ctint)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue