Releases: AllenDang/cimgui-go
v1.2.0
Introduction
Hi!
Today we present a next release of cimgui-go with many new features and bugfixes.
Breaking Changes
We're so sorry for that, but again we had to do some (fortunately small) breaking changes.
Plot*
andImNodes*
prefixes were removed from auto-generated functions.- for fast migration check out #364 (comment) (you can use a one-line sed instruction to update your project)
Release Highlights
- A new imgui plugin was added: ImGuiColorTextEdit
- Special thanks goes to @sonoro1234 for help with C code generation
- Special thanks goes to @sonoro1234 for help with C code generation
- Callback types were added to codegen 🎉
- A long-existing issue #224 was fixed
- For known limitations and brief description, see https://github.com/AllenDang/cimgui-go?tab=readme-ov-file#callbacks
- For implementation details check out #224 (comment)
- This also makes
github.com/AllenDang/cimgui-go/immarkdown
usable
- Many functions have been added (these using Callback typedefs; enum pointer arguments were added too)
github.com/AllenDang/cimgui-go/cmd/codegen
now uses ajson
file for imgui-specific generator configuration.- Our goal is to make the codegen a useful tool not only for cimgui-go but make it able to generate any Go binding based on cimgui-like JSON configs.
- Things like renames or skipped typedefs/structs/funcs are not hardcoded anymore.
- Some types were given a
NewEmptyXXX
creator initializing them with their 0 values (like they would be by usingnew(XXX)
)
What's Changed - detailed changelog
- add ImGuiColorTextEditor by @gucio321 in #365
- build(deps): bump github.com/hajimehoshi/ebiten/v2 from 2.8.2 to 2.8.3 by @dependabot in #368
- Auto generated callbacks implementation by @gucio321 in #367
- Update dependencies by @gucio321 in #373
- Code cleanup by @gucio321 in #374
- codegen: add const unsigned char by @gucio321 in #377
- remove ImNodes/Plot prefixes by @gucio321 in #378
- codegen: free source char* after C.GoString call by @gucio321 in #379
- codegen: fix enums generation by @gucio321 in #380
- codegen: Add presets json support by @gucio321 in #381
- Callbacks attempt 2: generate non-pointer callbacks by @gucio321 in #382
- codegen: add NewEmptyXXX by @gucio321 in #383
- build(deps): bump github.com/hajimehoshi/ebiten/v2 from 2.8.3 to 2.8.4 by @dependabot in #384
- Codegen: fix unexported funcs by @gucio321 in #385
- Rename NewXXXEmpty -> NewEmptyXXX by @gucio321 in #386
- Revert "codegen: free source char* after C.GoString call" by @gucio321 in #387
- update readme for callbacks generation by @gucio321 in #388
- codegen: in non-pointer callbacks: interpret & as pointer by @gucio321 in #389
Full Changelog: v1.1.0...v1.2.0
v1.1.0
Introduction
Hi!
We present another release of cimgui-go today.
Its major highlights are:
- implementation of the ImGuizmo extension
- Imgui update
- bugfix in glfwbackend causing GL error in some circumstances.
- fix of crucial issues in the internal conversions mechanism
- package layout redesign (BREAKING CHANGE)
- change of type for all in/out slices to pointers (BREAKING CHANGE)
- improvement of
Vector
type - it now shares the Slice() method.
Breaking Changes
- if you use a slice as an argument to cimgui-go function, replace it with
utils.SliceToPtr(yourslice)
- this was necessary, because we cannot in fact determine whether a C pointer is a Slice or Pointer. Conversion from slice to pointer is easier and makes more sense than conversion from ptr to slice.
- There was an issue making it impossible to pass an empty slice or nil (runtime panic)
- ConvertCTypes and some Wrap* functions have been hidden.
- you shouldn't have to use these functions - its use should be handled internally by cimgui-go. They are highly unsafe.
imgui.Vector
was moved tovectors.Vector
- Vector type does not belong to the
imgui
package so putting it there isn't the right approach.
- Vector type does not belong to the
imgui.SliceToPtr
was moved toutils.SliceToPtr
- As above: this function does not belong to
imgui
's code and should not be there.
- As above: this function does not belong to
datautils
package was renamed toutils
.Does it make it work better?
- No, but this name is shorter. This package was entirely redesigned anyway so a name change will not break much more.
We are so sorry for these breaking changes. We hope their positive impact on your project will be much greater than your dissatisfaction related to implementing them. We promise we'll try to avoid them in future releases so that you can update smoothly.
What's Changed
- Update imgui to 646df390032f64eb03f8b5e2e5cbaf0c8e3bb237 by @gucio321 in #355
- hotfix(glfwbackend): revert part of #348 by @gucio321 in #356
- add ImGuizmo plugin by @gucio321 in #297
- hotfix(datautils): WrapNumberPtr now works as expected by @gucio321 in #357
- codegen: get rid of simplePtrSliceW by @gucio321 in #358
- examples: add gizmo usage example by @gucio321 in #359
- build(deps): bump github.com/hajimehoshi/ebiten/v2 from 2.8.1 to 2.8.2 by @dependabot in #360
- Reorder pkg by @gucio321 in #361
- Add imguizmo comments by @gucio321 in #362
- Vectors rework by @gucio321 in #363
Full Changelog: v1.0.3...v1.1.0
v1.0.3
Summary
There is one important change here is that Garbage COllector no longer crashes your program when trying to free not-used textures.
You have to free them manually by calling (*Texture).Release
What's Changed
- build(deps): bump github.com/hajimehoshi/ebiten/v2 from 2.8.0 to 2.8.1 by @dependabot in #346
- build(deps): bump golangci/golangci-lint-action from 6.1.0 to 6.1.1 by @dependabot in #347
- Change the SDL backend of SetCursor to accept global positions. by @Bradbev in #349
- refactor(glfwbackend): move clear buffer before render loop by @anasrar in #348
- README: Update by @gucio321 in #352
- reame: Fix status badges by @gucio321 in #353
- backend/texture: change default texture impl by @gucio321 in #354
New Contributors
Full Changelog: v1.0.2...v1.0.3
v1.0.2
Introduction
Hi evryone!
This is a bugfix release for v1.0.1.
Its main purpose is to fix broken go mod vendor
on this package. It also includes a major refactor of examples.
What's Changed
- Ebiten backend: game in texture by @gucio321 in #339
- examples: major refactor by @gucio321 in #340
- there was something wrong with go.mod by @gucio321 in #342
- build(deps): bump github.com/hajimehoshi/ebiten/v2 from 2.7.10 to 2.8.0 by @dependabot in #341
- improve dummy system so that vendoring should work now by @gucio321 in #344
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Introduction
Hi there!
This is a small bugfix release for v1.0.0.
It mainly includes a fix to ClipboardHandler
and a minor change in sdlbackend
that allows to run OpenGL code in cimgui-go loop.
Today our project was also added to the awesome-go 🎉
What's Changed
- readme: add badges on top by @gucio321 in #328
- This change moves the calls to glViewport, glClearColor, glClear so t… by @Bradbev in #333
- Fix clipboard by @gucio321 in #332
- Fix dummy formatting by @gucio321 in #336
- README: add awesome go badge by @gucio321 in #337
Full Changelog: v1.0.0...v1.0.1
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
- b...