Skip to content

Commit

Permalink
Merge pull request #273 from nomad-software/add-drawbillboardpro
Browse files Browse the repository at this point in the history
Added DrawBillboardPro function.
  • Loading branch information
gen2brain committed Jul 19, 2023
2 parents 9def9b0 + a72c780 commit 1083eac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions raylib/rmodels.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,20 @@ func DrawBillboardRec(camera Camera, texture Texture2D, sourceRec Rectangle, cen
C.DrawBillboardRec(*ccamera, *ctexture, *csourceRec, *ccenter, *csize, *ctint)
}

// DrawBillboardPro - Draw a billboard texture with pro parameters
func DrawBillboardPro(camera Camera, texture Texture2D, sourceRec Rectangle, position Vector3, up Vector3, size Vector2, origin Vector2, rotation float32, tint Color) {
ccamera := camera.cptr()
ctexture := texture.cptr()
csourceRec := sourceRec.cptr()
cposition := position.cptr()
cup := up.cptr()
csize := size.cptr()
corigin := origin.cptr()
crotation := (C.float)(rotation)
ctint := colorCptr(tint)
C.DrawBillboardPro(*ccamera, *ctexture, *csourceRec, *cposition, *cup, *csize, *corigin, crotation, *ctint)
}

// DrawMesh - Draw a single mesh
func DrawMesh(mesh Mesh, material Material, transform Matrix) {
C.DrawMesh(*mesh.cptr(), *material.cptr(), *transform.cptr())
Expand Down

0 comments on commit 1083eac

Please sign in to comment.