Giter Club home page Giter Club logo

ademenev / cimgui-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allendang/cimgui-go

0.0 0.0 0.0 86.12 MB

Auto generated Go wrapper for Dear ImGui via cimgui

License: MIT License

Shell 0.28% C++ 62.26% Python 0.21% C 13.80% Objective-C 0.18% Lua 13.21% Go 1.37% PowerShell 1.64% Kotlin 0.01% Objective-C++ 1.15% Nix 0.01% Makefile 0.25% HTML 0.04% CMake 5.44% GLSL 0.01% Batchfile 0.10% GDB 0.01% Dockerfile 0.02% Qt Script 0.02%

cimgui-go's Introduction

cimgui-go GoDoc

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), windows(x64), Arch Linux/KDE and Fedora Workstation 36, idealy other linux GUI 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.
  • If function comes from imgui_internal.h, Internal prefix is added.
  • Struct fields (if any exported) are prefixed with word Field

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

Install GNU make and run make to re-generate bunding.

Update

To update to the latest version of dependencies, run make update. After doing this, commit changes and navigate to GitHub. In Actions tab, manually trigger workflows for each platform.

How does it work?

  • cimgui/ directory holds C binding for C++ Dear ImGui libraries
  • generator bases on cimgui/{package_name}_templates and generates all necessary GO/C code
  • libs/ contains pre-built shared libraries. cimgui.go includes and uses to decrease building time.

cimgui-go's People

Contributors

gucio321 avatar allendang avatar neclepsio avatar winpooh32 avatar dependabot[bot] avatar ptxmac avatar wieku avatar ademenev avatar asmaloney avatar eliasdaler avatar hallum avatar supergod avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.