Allow passing points for drawing as const slices (#127)
This commit is contained in:
parent
da1da5a66c
commit
6cc4aec3c4
3 changed files with 36 additions and 30 deletions
|
|
@ -212,7 +212,7 @@ pub extern "c" fn DrawPixelV(position: rl.Vector2, color: rl.Color) void;
|
|||
pub extern "c" fn DrawLine(startPosX: c_int, startPosY: c_int, endPosX: c_int, endPosY: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineV(startPos: rl.Vector2, endPos: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineEx(startPos: rl.Vector2, endPos: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineStrip(points: [*c]rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineStrip(points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineBezier(startPos: rl.Vector2, endPos: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircle(centerX: c_int, centerY: c_int, radius: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleSector(center: rl.Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: rl.Color) void;
|
||||
|
|
@ -239,16 +239,16 @@ pub extern "c" fn DrawRectangleRoundedLines(rec: rl.Rectangle, roundness: f32, s
|
|||
pub extern "c" fn DrawRectangleRoundedLinesEx(rec: rl.Rectangle, roundness: f32, segments: c_int, lineThick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangle(v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleLines(v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleFan(points: [*c]rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleStrip(points: [*c]rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleFan(points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleStrip(points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPoly(center: rl.Vector2, sides: c_int, radius: f32, rotation: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPolyLines(center: rl.Vector2, sides: c_int, radius: f32, rotation: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPolyLinesEx(center: rl.Vector2, sides: c_int, radius: f32, rotation: f32, lineThick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineLinear(points: [*c]rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBasis(points: [*c]rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineCatmullRom(points: [*c]rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBezierQuadratic(points: [*c]rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBezierCubic(points: [*c]rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineLinear(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBasis(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineCatmullRom(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBezierQuadratic(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBezierCubic(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentLinear(p1: rl.Vector2, p2: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentBasis(p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2, p4: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentCatmullRom(p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2, p4: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
|
|
@ -265,7 +265,7 @@ pub extern "c" fn CheckCollisionCircleRec(center: rl.Vector2, radius: f32, rec:
|
|||
pub extern "c" fn CheckCollisionPointRec(point: rl.Vector2, rec: rl.Rectangle) bool;
|
||||
pub extern "c" fn CheckCollisionPointCircle(point: rl.Vector2, center: rl.Vector2, radius: f32) bool;
|
||||
pub extern "c" fn CheckCollisionPointTriangle(point: rl.Vector2, p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2) bool;
|
||||
pub extern "c" fn CheckCollisionPointPoly(point: rl.Vector2, points: [*c]rl.Vector2, pointCount: c_int) bool;
|
||||
pub extern "c" fn CheckCollisionPointPoly(point: rl.Vector2, points: [*c]const rl.Vector2, pointCount: c_int) bool;
|
||||
pub extern "c" fn CheckCollisionLines(startPos1: rl.Vector2, endPos1: rl.Vector2, startPos2: rl.Vector2, endPos2: rl.Vector2, collisionPoint: [*c]rl.Vector2) bool;
|
||||
pub extern "c" fn CheckCollisionPointLine(point: rl.Vector2, p1: rl.Vector2, p2: rl.Vector2, threshold: c_int) bool;
|
||||
pub extern "c" fn CheckCollisionCircleLine(center: rl.Vector2, radius: f32, p1: rl.Vector2, p2: rl.Vector2) bool;
|
||||
|
|
@ -432,7 +432,7 @@ pub extern "c" fn DrawLine3D(startPos: rl.Vector3, endPos: rl.Vector3, color: rl
|
|||
pub extern "c" fn DrawPoint3D(position: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircle3D(center: rl.Vector3, radius: f32, rotationAxis: rl.Vector3, rotationAngle: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangle3D(v1: rl.Vector3, v2: rl.Vector3, v3: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleStrip3D(points: [*c]rl.Vector3, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleStrip3D(points: [*c]const rl.Vector3, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCube(position: rl.Vector3, width: f32, height: f32, length: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCubeV(position: rl.Vector3, size: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCubeWires(position: rl.Vector3, width: f32, height: f32, length: f32, color: rl.Color) void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue