From 04c8c4217864e5884dbc42a10918c392c19bf9b9 Mon Sep 17 00:00:00 2001 From: hallum Date: Fri, 26 Aug 2022 12:36:26 -0400 Subject: [PATCH 1/2] Add additional libraries to backend.go cgo statements for amd64,linux to build successfully --- backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.go b/backend.go index 5bca12e99..aed67e43f 100644 --- a/backend.go +++ b/backend.go @@ -1,6 +1,6 @@ package cimgui -// #cgo amd64,linux LDFLAGS: ${SRCDIR}/lib/linux/x64/libglfw3.a +// #cgo amd64,linux LDFLAGS: ${SRCDIR}/lib/linux/x64/libglfw3.a -ldl -lGL -lX11 // #cgo amd64,windows LDFLAGS: -L${SRCDIR}/lib/windows/x64 -l:libglfw3.a -lgdi32 -lopengl32 -limm32 // #cgo darwin LDFLAGS: -framework Cocoa -framework IOKit -framework CoreVideo // #cgo amd64,darwin LDFLAGS: ${SRCDIR}/lib/macos/x64/libglfw3.a From 733db384e2718194e52e87c744ee78ed4977465c Mon Sep 17 00:00:00 2001 From: hallum Date: Fri, 26 Aug 2022 21:30:19 -0400 Subject: [PATCH 2/2] Correct NewImVec4 args to ImVec4 fields, modified ImVec4 struct fields to align with dear imgui struct positions --- extra_types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra_types.go b/extra_types.go index 72dfb66de..b2e0c33e4 100644 --- a/extra_types.go +++ b/extra_types.go @@ -46,16 +46,16 @@ func (vec *ImVec2) wrap() (out *C.ImVec2, finisher func()) { type ImVec4 struct { X float32 Y float32 - W float32 Z float32 + W float32 } func NewImVec4(r, g, b, a float32) ImVec4 { return ImVec4{ X: r, Y: g, - W: b, - Z: a, + Z: b, + W: a, } }