v1.0.0
INTRODUCTION
Hi everyone!
I have the honor to annouce the first cimgui-go release.
The great work has been done on this project since Tue Aug 9 12:12:13 2022 when @AllenDang did the first commit in 5ee6a09.
Now cimgui-go became mature enough to receive its first stable release.
Code version
We are using code from several third party repositories. As we couldn't use (because of some complex reasons) Git Submodules, we've recorded their versions in VERSION.txt, which on the current v1.0.0 moment looks as follows:
cimgui (https://github.com/cimgui/cimgui) HEAD is on: 0c7f67607d2aac88f5eaa9aa907a868a17144d58
cimgui/imgui HEAD is on: 8ba7efb738d6ee992ef81b451162591e43badbcf
cimplot (https://github.com/cimgui/cimplot) HEAD is on: 439f705b1cfae0e9fbe42c13ab5b45becc47d404
cimplot/implot HEAD is on: f156599faefe316f7dd20fe6c783bf87c8bb6fd9
cimnodes (https://github.com/cimgui/cimnodes) HEAD is on: f20c83c3cab8e99828d85c66ed3acd087f632c21
cimnodes/imnodes HEAD is on: 8563e1655bd9bb1f249e6552cc6274d506ee788b
cimmarkdown (https://github.com/gucio321/cimmarkdown) HEAD is on: 6e921ffc2b57a9969b98bf8f5aeed912bfb497f6
cimmarkdown/imgui_markdown HEAD is on: 4eb198f68090c9a1622bb9c78ee61f65b6ddc898
Dear ImGui Plugins
As everyone knows, Dear ImGui has many cool plugins.
With help of @sonoro1234 (who created the awesome cimgui project) we managed to implement the following plugins:
- implot - Immediate Mode Plotting
- imnodes - A small, dependency-free node editor for dear imgui
- imgui_markdown - Markdown for Dear ImGui (not completely functional, see limitations)
Backends
Because in many cases using Dear ImGui without graphics bakend implementation is annoying (requires user to implement it manually), we've decided to include a few useful backend implementations in this repository, including:
- GLFW + OpenGL backend (based on an example form imgui)
- SDL + OpenGL backend (also basing on another example from imgui)
- Ebiten backend, which is a go native largest open source renderer. In this point I'd like to once again express large thanks to @gabstv and @damntourists - the initiators and creators of the code responsible for this backend.
Known Limitations
Unfortunately we do not lack issues and problems with our generator as well as with our backends. Here are pointed out the largest of them that will be hopefully fixed in the future releases.
- Callbacks generation - C->Go->C callbacks are not easy to do unfortunately. I feel like noone did them in an elegant way before but we'll work on it in the future.
- The main recommended backend is for now GLFW, as only this backend has full set of features provided for in the
backend.Backend
interface. Other backends may lack some of them yet.
Detailed Changelog
What's Changed
- Add additional libraries to backend.go cgo statements for amd64,linux… by @hallum in #2
- Make glfw backend optional by @ptxmac in #5
- Add helper to get font texture as Alpha8 by @ptxmac in #4
- [bugfix] Put Z before W in Vec4 by @ptxmac in #3
- Sort identifiers lexigoraphically for reprodicible code generation by @eliasdaler in #24
- fix glfw context #29 by @SuperGod in #30
- Example: Fix texture, spelling, and error message by @asmaloney in #37
- test: Fix build & spelling by @asmaloney in #38
- proposal: use git submodules for storing imgui dependencies by @gucio321 in #18
- Glfw submodule by @gucio321 in #40
- Revert "Merge pull request #18 from gucio321/use-submodules" by @gucio321 in #46
- cmd/codegen: improve debug information by @gucio321 in #52
- workflows: add github action for checking code on Pull Requests by @gucio321 in #45
- Revert "Add GLFW as a git submodule (#40)" by @gucio321 in #53
- Trim ImGui/Im prefixes from Dear ImGui enums by @eliasdaler in #26
- Wrapper: use generics by @gucio321 in #61
- test.yaml: check for diffs in auto-generated files by @gucio321 in #62
- codegen: return out value instead of taking pointer to it by @gucio321 in #65
- gencode: not rename GetCursor* to GetDrawCurosr* by @gucio321 in #66
- gitignore: ignore editor's temporary files by @gucio321 in #59
- ImVec2/ImVec4: add basic algebra by @gucio321 in #49
- codegen: returnWraper does not need FuncDefs arg anymore by @gucio321 in #68
- generator: add package header by @gucio321 in #57
- cmd/codegen: add missing ImWchar return type by @gucio321 in #51
- codegen: bunch of refactors by @gucio321 in #70
- Makefile by @gucio321 in #67
- codegen: trim trailing _ suffix in enums by @gucio321 in #73
- Extra types: trim im/ImGui prefix by @gucio321 in #75
- Codegen: cleanup by @gucio321 in #71
- Codegen cleanup #2 by @gucio321 in #76
- Codegen cleanup by @gucio321 in #77
- Add conversions for Color by @neclepsio in #78
- proposal: change package name
cimgui
->imgui
by @gucio321 in #81 - codegen: refactor by @gucio321 in #82
- Add idiomatic bindings by @neclepsio in #79
- Setup linter by @gucio321 in #83
- extra types: rename NewColor's args from x,y,z,w to r,g,b,a by @gucio321 in #86
- codegen: remove pointer receivers by @gucio321 in #88
- Fix nonudt functions return by @gucio321 in #93
- arg type: change type of array arguments from [n]*type -> *[n]type by @gucio321 in #85
- test workflow: add test names by @gucio321 in #97
- extra types: fix data race issues by @gucio321 in #98
- Hotfix: finishers strategy by @gucio321 in #96
- implot internal support by @WinPooh32 in #99
- Implement PlotTime by @WinPooh32 in #102
- Fix newlines by @gucio321 in #103
- workflow: add windows test by @gucio321 in #107
- extra types: fix C type in plot time by @gucio321 in #106
- add window.SetShouldClose method by @WinPooh32 in #110
- build(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 by @dependabot in #111
- build(deps): bump actions/checkout from 2.3.4 to 3.3.0 by @dependabot in #114
- build(deps): bump actions/setup-go from 3 to 4 by @dependabot in #115
- make: use gofumpt instead of gofmt by @gucio321 in #116
- Include internal functions by @gucio321 in #119
- argumentwrapper: Add support for const ImRect by @ptxmac in #121
- makefile: add update rule by @gucio321 in #122
- Add type KeyChord by @ptxmac in #124
- Backend: refactoring by @gucio321 in #126
- Output parameter default hints in the same order as in the function by @ptxmac in #125
- makefile: update: checkout branches before generating by @gucio321 in #130
- Add helper to install clipboard callbacks by @ptxmac in #128
- codegen: consider non-pointer arguments of auto-generated struct type by @gucio321 in #132
- Improve logging by @gucio321 in #133
- codegen: wrappers improvement by @gucio321 in #135
- Comments by @gucio321 in #136
- backend: add SetWindowPos by @gucio321 in #146
- Codegen: remove Im* prefix restriction on structs by @gucio321 in #138
- Revert wchar / rune mapping by @ptxmac in #150
- glfw: export Drop callback by @gucio321 in #145
- backend: remove dependency on GLFWBackend by @gucio321 in #158
- build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 by @dependabot in #159
- fix issues/163 : call C.free on a GO pointer - not C pointer that cause a panic by @keepstep in #165
- build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 by @dependabot in #166
- Close cb by @gucio321 in #170
- codegen: generate GO structs by @gucio321 in #151
- Pointers generation fix by @gucio321 in #174
- Debugging improvement by @gucio321 in #173
- Codegen fixes by @gucio321 in #177
- Structgen fixes by @gucio321 in #180
- add helper SliceToPtr method by @gucio321 in #179
- codegen: make a separated module by @gucio321 in #142
- Update windows lib from ci by @gucio321 in #181
- utils: remove Get prefix by @gucio321 in #152
- Wrapper export by @gucio321 in #143
- Simple ptr r by @gucio321 in #182
- Implement imvector by @gucio321 in #183
- cimgui: update C++ deps by @gucio321 in #185
- build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 by @dependabot in #186
- codegen: general refactor by @gucio321 in #187
- Add set icons to backend by @gucio321 in #189
- glfw backend: add WindowHint method by @gucio321 in #190
- codegen: pointers bugfix by @gucio321 in #191
- Backend add callbacks by @gucio321 in #193
- add cimnodes by @gucio321 in #176
- hotfix: codegen: fix bug when cimnodes funcs were not generated at all by @gucio321 in #197
- Workaround input text by @gucio321 in #198
- codegen: introduce helper types to clearify code by @gucio321 in #199
- Gencpp refactor by @gucio321 in #201
- Finishers refactor by @gucio321 in #202
- Fix go vendor by @gucio321 in #203
- build(deps): bump actions/checkout from 3 to 4 by @dependabot in #205
- Generator: add types by @gucio321 in #204
- Enum comments by @gucio321 in #207
- vectors: use runtime.Pinner to pin vector data by @gucio321 in #208
- merge workflow files by @gucio321 in #210
- Fix void ptr arg by @gucio321 in #211
- workflow: add macos by @gucio321 in #212
- Backend flags fix by @gucio321 in #214
- Gencpp bugfix by @gucio321 in #215
- Remove types from being excluded by @gucio321 in #217
- backend: add ContentScale method by @gucio321 in #218
- glfw backend: add GLFWKey by @gucio321 in #219
- glfw: wrap GLFW_MOD_* by @gucio321 in #220
- hotfix: fix naming by @gucio321 in #221
- add imgui_markdown integration by @gucio321 in #223
- build(deps): bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in #228
- Add SDL backend by @gucio321 in #230
- Separate backend by @gucio321 in #232
- Revert "Separate backend" by @gucio321 in #233
- build(deps): bump actions/setup-go from 4 to 5 by @dependabot in #235
- Fix sdl on windows by @gucio321 in #237
- Text end bugfix by @gucio321 in #241
- build(deps): bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by @dependabot in #242
- typedefs generation by @gucio321 in #229
- codegen: fix getters/setters with void* type generation by @gucio321 in #244
- readme: add go reference link by @gucio321 in #246
- texture.go: remove go:build directive by @gucio321 in #250
- glfw backend: wrap ImGui_ImplGlfw_KeyCallback and call it in SetKeyCa… by @gucio321 in #251
- codegen: add coverage counter for typedefs by @gucio321 in #253
- update dependencies by @gucio321 in #254
- Relay asserts to go by @Wieku in #256
- Fix strings being cut short by 1 char by @Wieku in #259
- makefile: generate common dummy.go for the whole project by @gucio321 in #260
- Fix overloads by @gucio321 in #264
- backend: make backendCExposer optional part of Backend interface by @gucio321 in #265
- texture: export ID field by @gucio321 in #266
- function args: add array support by @gucio321 in #272
- Codegen refactor by @gucio321 in #273
- Array return type by @gucio321 in #274
- texture: remove 0 check by @gucio321 in #267
- sdl backend: fix typo in build tag by @gucio321 in #268
- Funcs comments generator by @gucio321 in #277
- glfw: fix DeleteTexture implementation by @gucio321 in #280
- Add OS thread locking in example code by @tenten8401 in #278
- codegen: enforce type on enums constants by @gucio321 in #282
- build(deps): bump golangci/golangci-lint-action from 4.0.0 to 5.0.0 by @dependabot in #283
- build(deps): bump golangci/golangci-lint-action from 5.0.0 to 5.3.0 by @dependabot in #284
- build(deps): bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 by @dependabot in #285
- Add SDL flags support by @eszdman in #286
- Added SwapInterval support for backends, fixed windows compilation issues by @eszdman in #287
- Implement SetCursorPos and SetInputMode methods for both backends by @eszdman in #288
- Fix memory leak in igGLFWWindow_SetIcon by @PGZXB in #290
- build(deps): bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 by @dependabot in #293
- Update glfw_backend.cpp by @lzytaro in #294
- Ebiten backend for cimgui-go by @gucio321 in #296
- examples: add separated example for each backend by @gucio321 in #299
- workflows: update go to 1.23 by @gucio321 in #300
- Backend: put in separated package by @gucio321 in #301
- Export cimgui C wrappers by @gucio321 in #305
- remove cimplot directory by @gucio321 in #308
- move backend.go and XXX backend to backend/ package by @gucio321 in #307
- rename C dependencies directory by @gucio321 in #309
- makefile: use go insteall instead of get to install gofumpt by @gucio321 in #310
- build(deps): bump github.com/hajimehoshi/ebiten/v2 from 2.7.8 to 2.7.10 by @dependabot in #311
- Move Wrapper utils to the separated package by @gucio321 in #312
- datautils: remove tryPin part of WrapVoidPtr by @gucio321 in #313
- Logs improvement by @gucio321 in #315
- remove ConvertCTypes from the main package by @gucio321 in #316
- backend: fix typo Destory->Destroy by @gucio321 in #317
- Add frameworks to the SDL2 Darwin build so the example runs by @Bradbev in #318
- Sdlbackend add after render by @Bradbev in #322
- Examples: add ebiten game example by @gucio321 in #323
- Split module to separated packages by @gucio321 in #319
- Ebiten color mechanism by @gucio321 in #324
- Add some more types support by @gucio321 in #321
New Contributors
- @hallum made their first contribution in #2
- @ptxmac made their first contribution in #5
- @eliasdaler made their first contribution in #24
- @SuperGod made their first contribution in #30
- @asmaloney made their first contribution in #37
- @gucio321 made their first contribution in #18
- @neclepsio made their first contribution in #78
- @WinPooh32 made their first contribution in #99
- @dependabot made their first contribution in #111
- @keepstep made their first contribution in #165
- @Wieku made their first contribution in #256
- @tenten8401 made their first contribution in #278
- @eszdman made their first contribution in #286
- @PGZXB made their first contribution in #290
- @lzytaro made their first contribution in #294
- @Bradbev made their first contribution in #318
Full Changelog: https://github.com/AllenDang/cimgui-go/commits/v1.0.0