From 19dc46f86c85eece7a5ad780b953032752db12d0 Mon Sep 17 00:00:00 2001 From: jack gleeson Date: Wed, 6 Dec 2023 19:51:46 -0800 Subject: [PATCH 1/3] Add binding for DrawTriangle3D to rmodels.go --- raylib/rmodels.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/raylib/rmodels.go b/raylib/rmodels.go index 4ea205d..dc876de 100644 --- a/raylib/rmodels.go +++ b/raylib/rmodels.go @@ -93,6 +93,15 @@ func DrawCircle3D(center Vector3, radius float32, rotationAxis Vector3, rotation C.DrawCircle3D(*ccenter, cradius, *crotationAxis, crotationAngle, *ccolor) } +// DrawTriangle3D - Draw a color-filled triangle (vertex in counter-clockwise order!) +func DrawTriangle3D(v1 Vector3, v2 Vector3, v3 Vector3, col color.RGBA) { + cv1 := v1.cptr() + cv2 := v2.cptr() + cv3 := v3.cptr() + ccolor := colorCptr(col) + C.DrawTriangle3D(*cv1, *cv2, *cv3, *ccolor) +} + // DrawCube - Draw cube func DrawCube(position Vector3, width float32, height float32, length float32, col color.RGBA) { cposition := position.cptr() From 2bee857547dfaf13600eaa3a18c1d085bbc28d23 Mon Sep 17 00:00:00 2001 From: Yassen Tombokti Date: Mon, 18 Dec 2023 21:59:40 +0000 Subject: [PATCH 2/3] Update README.md --- physics/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/README.md b/physics/README.md index b86c883..0005dff 100644 --- a/physics/README.md +++ b/physics/README.md @@ -2,4 +2,4 @@ 2D Physics library for videogames. -A port of Victor Fisac's [physac engine](https://github.com/raysan5/raylib/blob/master/src/physac.h). +A port of Victor Fisac's [physac engine](https://github.com/raysan5/physac/blob/master/src/physac.h). From cf285a20a18794619cd0a8b66e9ceb75423753bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Tue, 19 Dec 2023 14:38:36 +0000 Subject: [PATCH 3/3] Fix mouseCell pointer not updaing value --- raygui/raygui.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raygui/raygui.go b/raygui/raygui.go index f2b40e8..1a3f8ef 100644 --- a/raygui/raygui.go +++ b/raygui/raygui.go @@ -621,6 +621,8 @@ func Grid(bounds rl.Rectangle, text string, spacing float32, subdivs int32, mous cmouseCell.x = C.float(mouseCell.X) cmouseCell.y = C.float(mouseCell.Y) res := C.GuiGrid(cbounds, ctext, cspacing, csubdivs, &cmouseCell) + mouseCell.X = float32(cmouseCell.x) + mouseCell.Y = float32(cmouseCell.y) return int32(res) }