From 5bc524d944ee7aa750c3dd44688f7cc75c738c09 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sat, 4 Jul 2026 12:50:42 +0200 Subject: [PATCH] vendor/box3d: Linux amd64 Also remove #by_ptr from a proc because there may be a bug in #by_ptr here --- .gitattributes | 3 ++- vendor/box3d/box3d.odin | 11 +++++++++-- vendor/box3d/box3d_types.odin | 14 +++++++------- vendor/box3d/lib/linux-amd64/libbox3d.a | 3 +++ 4 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 vendor/box3d/lib/linux-amd64/libbox3d.a diff --git a/.gitattributes b/.gitattributes index 7c8ffd40c..07d705f0d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -29,4 +29,5 @@ vendor/raylib/v6/windows/raylib.lib filter=lfs diff=lfs merge=lfs -text vendor/raylib/v6/windows/raylibdll.lib filter=lfs diff=lfs merge=lfs -text vendor/raylib/v6/windows/raygui.dll filter=lfs diff=lfs merge=lfs -text vendor/raylib/v6/windows/raygui.lib filter=lfs diff=lfs merge=lfs -text -vendor/raylib/v6/windows/rayguidll.lib filter=lfs diff=lfs merge=lfs -text \ No newline at end of file +vendor/raylib/v6/windows/rayguidll.lib filter=lfs diff=lfs merge=lfs -text +vendor/box3d/lib/linux-amd64/libbox3d.a filter=lfs diff=lfs merge=lfs -text diff --git a/vendor/box3d/box3d.odin b/vendor/box3d/box3d.odin index 2eb792dea..4a2dce92b 100644 --- a/vendor/box3d/box3d.odin +++ b/vendor/box3d/box3d.odin @@ -7,11 +7,18 @@ import "core:c" ENABLE_VALIDATION :: false +BOX3D_SHARED :: #config(BOX3D_SHARED, false) + when ODIN_OS == .Windows { @(export) foreign import lib { "lib/box3d.lib", } +} else when ODIN_OS == .Linux && ODIN_ARCH == .amd64 && !BOX3D_SHARED { + @(export) + foreign import lib { + "lib/linux-amd64/libbox3d.a", + } } else { @(export) foreign import lib { @@ -889,7 +896,7 @@ foreign lib { // Create a convex hull shape and attach it to a body. The shape definition is fully cloned. Contacts are not created // until the next time step. // @return the shape id for accessing the shape - CreateHullShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, #by_ptr hull: HullData) -> ShapeId --- + CreateHullShape :: proc(bodyId: BodyId, #by_ptr def: ShapeDef, hull: ^HullData) -> ShapeId --- // Create a convex hull shape and attach it to a body. The hull is cloned then transformed with scale applied first. // Use this for non-uniform or mirrored scale or a baked local transform. The baked result is shared through the @@ -1824,4 +1831,4 @@ foreign lib { Contact_GetData :: proc(contactId: ContactId) -> ContactData --- /**@}*/ // contact -} \ No newline at end of file +} diff --git a/vendor/box3d/box3d_types.odin b/vendor/box3d/box3d_types.odin index 895261696..4c6c784d6 100644 --- a/vendor/box3d/box3d_types.odin +++ b/vendor/box3d/box3d_types.odin @@ -1958,13 +1958,13 @@ HullData :: struct { // Efficient box hull BoxHull :: struct { // The embedded hull. So the offsets index into the arrays that follow. - base: HullData, - boxVertices: [8]HullVertex, //< Box vertices. - boxPoints: [8]Vec3, //< Box points. - boxEdges: [24]HullHalfEdge, //< Box half-edges. - boxFaces: [6]HullFace, //< Box faces. - padding: [2]u8, //< Explicit padding, see b3HullData::padding. - boxPlanes: [6]Plane, //< Box face planes. + base: HullData, + boxVertices: [8]HullVertex, //< Box vertices. + boxPoints: [8]Vec3, //< Box points. + boxEdges: [24]HullHalfEdge, //< Box half-edges. + boxFaces: [6]HullFace, //< Box faces. + padding: [2]u8, //< Explicit padding, see b3HullData::padding. + boxPlanes: [6]Plane, //< Box face planes. } /**@}*/ // hull diff --git a/vendor/box3d/lib/linux-amd64/libbox3d.a b/vendor/box3d/lib/linux-amd64/libbox3d.a new file mode 100644 index 000000000..ac6223456 --- /dev/null +++ b/vendor/box3d/lib/linux-amd64/libbox3d.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:948651aca53740a4a47a8251b68982b839fa62da91689035132be1c273cbd7da +size 1536158