raylib-go
raylib-go copied to clipboard
Raygui C bindings and example
Converting the Go Raygui implementation into a normal C binding so we can get updates and bugfixes from the official raygui.h upstream.
Thanks, looks like a nice start. Though raygui is an external project, not part of raylib, it should really be a separate package and not included like this. Similar to how raylib for renamed to just rl, the raygui package should be named rg, I believe that is the shortcut that is used in some places, so e.g. GuiLoadStyle is renamed to rg.LoadStyle.
That, of course, means that some code must be duplicated because raygui needs to link raylib library, and it is not possible to just include raylib-go/raylib and be done (I believe there is an open Go issue about this). So cgo files should include paths like CFLAGS: -I../raylib, C files can be included in the build like this, for example:
rcore.go:
package rg
/*
#include "../raylib/rcore.c"
*/
import "C"
That is why at the start rewriting the raygui.h in Go seemed like a nice idea until it was rewritten (raygui). It is again a nice idea but nobody is willing to rewrite it again, at least I am not.
That is exactly the kind of feedback I was hoping for by posting this early, thanks for taking a look!
Hello, In my point of view, after #221 may be closed