vendor/box3d: Linux amd64

Also remove #by_ptr from a proc because there may be a bug in #by_ptr
here
This commit is contained in:
Laytan Laats
2026-07-04 12:50:42 +02:00
parent a7242579ef
commit 5bc524d944
4 changed files with 21 additions and 10 deletions

3
.gitattributes vendored
View File

@@ -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
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

View File

@@ -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
}
}

View File

@@ -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

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:948651aca53740a4a47a8251b68982b839fa62da91689035132be1c273cbd7da
size 1536158