diff --git a/raylib/shapes.go b/raylib/shapes.go index 2bdf435..cf3dc12 100644 --- a/raylib/shapes.go +++ b/raylib/shapes.go @@ -281,6 +281,22 @@ func DrawTriangleLines(v1, v2, v3 Vector2, color Color) { C.DrawTriangleLines(*cv1, *cv2, *cv3, *ccolor) } +// DrawTriangleFan - Draw a triangle fan defined by points +func DrawTriangleFan(points []Vector2, color Color) { + cpoints := (*C.Vector2)(unsafe.Pointer(&points[0])) + cpointsCount := (C.int)(int32(len(points))) + ccolor := color.cptr() + C.DrawTriangleLines(*cpoints, cpointsCount, *ccolor) +} + +// DrawTriangleStrip - Draw a triangle strip defined by points +func DrawTriangleStrip(points []Vector2, color Color) { + cpoints := (*C.Vector2)(unsafe.Pointer(&points[0])) + cpointsCount := (C.int)(int32(len(points))) + ccolor := color.cptr() + C.DrawTriangleStrip(*cpoints, cpointsCount, *ccolor) +} + // DrawPoly - Draw a regular polygon (Vector version) func DrawPoly(center Vector2, sides int32, radius, rotation float32, color Color) { ccenter := center.cptr()