Skip to content

Auto generated Go wrapper for Dear ImGui via cimgui

License

Notifications You must be signed in to change notification settings

hallum/cimgui-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cimgui-go

This project aims to generate go wrapper for Dear ImGui.

It comes with a default backend with GLFW 3.3 and OpenGL 3.2.

It works on macOS(arm64/x86) and windows(x64) now, idealy linux should works but I don't have a linux machine to test it. Check out examples, cd in and go run ..

Current solution is:

  1. Use cimgui's lua generator to generate function and struct definition as json.
  2. Generate proper go code from the definition (via manual crafted go program /cmd/codegen).
  3. Use the backend implementation from imgui (currently glfw and opengl3).
  4. Use github workflow to compile cimgui and glfw to static lib and place them in /lib folder for further link.

Naming convention

For functions, 'Im/ImGui/ig' is trimmed. 'GetCursorPos' is renamed to 'GetDrawCursor', same with "SetCursor...".

Function coverage

Currently most of the functions are generated, except memory related stuff (eg. memory allocator, storage management, etc...). If you find any function is missing, report an issue.

Generate binding

  1. Drop source code of imgui to cimgui/imgui.
  2. Run cimgui's generator script at cimgui/generator/generator.sh.
  3. Run make gencode.

About

Auto generated Go wrapper for Dear ImGui via cimgui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 50.5%
  • Lua 29.2%
  • C 12.2%
  • Go 5.8%
  • Objective-C++ 1.5%
  • Makefile 0.3%
  • Other 0.5%