From d786ac40bfd7099578eb3616f83c29ce0c72d1ed Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 4 Jul 2026 12:39:43 +0100 Subject: [PATCH] Fix `Create*Shape` bindings to use pointers directly --- vendor/box2d/box2d.odin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/box2d/box2d.odin b/vendor/box2d/box2d.odin index 2cdfea191..24bcff5c4 100644 --- a/vendor/box2d/box2d.odin +++ b/vendor/box2d/box2d.odin @@ -988,22 +988,22 @@ foreign lib { // Create a circle shape and attach it to a body. The shape definition and geometry are fully cloned. // Contacts are not created until the next time step. // @return the shape id for accessing the shape - CreateCircleShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, #by_ptr circle: Circle) -> ShapeId --- + CreateCircleShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, circle: ^Circle) -> ShapeId --- // Create a line segment shape and attach it to a body. The shape definition and geometry are fully cloned. // Contacts are not created until the next time step. // @return the shape id for accessing the shape - CreateSegmentShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, #by_ptr segment: Segment) -> ShapeId --- + CreateSegmentShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, segment: ^Segment) -> ShapeId --- // Create a capsule shape and attach it to a body. The shape definition and geometry are fully cloned. // Contacts are not created until the next time step. // @return the shape id for accessing the shape - CreateCapsuleShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, #by_ptr capsule: Capsule) -> ShapeId --- + CreateCapsuleShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, capsule: ^Capsule) -> ShapeId --- // Create a polygon shape and attach it to a body. The shape definition and geometry are fully cloned. // Contacts are not created until the next time step. // @return the shape id for accessing the shape - CreatePolygonShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, #by_ptr polygon: Polygon) -> ShapeId --- + CreatePolygonShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, polygon: ^Polygon) -> ShapeId --- // Destroy a shape. You may defer the body mass update which can improve performance if several shapes on a // body are destroyed at once.