Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a utility package for a small GUI library for debugging like ImGUI #3068

Open
11 tasks
hajimehoshi opened this issue Aug 21, 2024 · 5 comments
Open
11 tasks

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Aug 21, 2024

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

Ebitengine lacks a simple GUI library just for debugging, so why not :-) ?

There is an ImGUI binding for Ebitengine https://github.com/gabstv/ebiten-imgui, but unfortunately this uses Cgo and then this doesn't work on browsers.

I've not decided to create an original API or convert ImGUI to pure Go yet.

Why is this needed?

This was inspired by https://www.reddit.com/r/golang/comments/1exl1bi/my_experience_with_ebitengine_and_raylibgo_gmtk/

Also there were some requests for this in the Discord server.

A GUI library should be nice even for the current examples to manipulate parameters in a more intuitive way.

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Aug 21, 2024

We should go with ImGUI instead of inventing our own thing so that we can save time.

  • Using Wasm + Wazero seems the way to go so far (e.g. https://github.com/wasilibs/go-jq)
    • In this case, a Wasm file should be generated by Docker.
  • I'm fine to put the project under github.com/ebitengine

We'd be happy if somenoe could help us!

@hajimehoshi
Copy link
Owner Author

We can use the C version of ImGUI (https://github.com/cimgui/cimgui) with the API defintion in JSON (https://github.com/cimgui/cimgui/blob/master/generator/output/definitions.json)

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Aug 28, 2024

@damntourists
Copy link

damntourists commented Nov 16, 2024

FYI I've used https://github.com/gabstv/ebiten-imgui as a starting point to write a new backend for cimgui-go which was recently merged to their main branch if you're interested in taking a look? I'm currently using it to develop a simple game editor that uses ebiten as the renderer as a side project and it's been working well.

I was thinking that it would be interesting if we had a handle to the ebiten window to allow for setting multiviewport flags if available (glfw) or to render without a window and instead use the imgui backend to read the current frame from the ebiten thread. if we had the option to use the imgui window, we could drag the internal imgui windows out of the main window into their own separate windows for instance.

@hajimehoshi
Copy link
Owner Author

We've already decided to go with microui-based thing. Imgui is nice but it would be pretty hard to make it pure Go. Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants