Gnimuc / CImGui.jl

Julia wrapper for cimgui
https://github.com/cimgui/cimgui
MIT License
253 stars 25 forks source link

Example code doesn't actually run #76

Closed jpsamaroo closed 8 months ago

jpsamaroo commented 1 year ago

The code in examples/ is apparently unused, with the real demo window being provided by CImGui.ShowDemoWindow. Is there a reason for this? I've noticed that the code in the examples doesn't all work; for example, ImDrawCornerFlags_* are no longer defined in CImGui, causing the custom rendering examples to break.

Gnimuc commented 1 year ago

Which version are you working on? Those examples are not upgraded to v1.82.

jpsamaroo commented 1 year ago

I'm on v1.82, so I guess we probably should update the generator to provide those flags?

Gnimuc commented 1 year ago

We need to update those examples.

Gnimuc commented 1 year ago

Maybe we should remove some outdated examples.

heyx3 commented 1 year ago

Ah, I was about to make an issue about this but found this thread.

The following line of code in the demos is also a problem: unsafe_load(io.Fonts.TexID); the Fonts pointer does not appear to have an overloaded getproperty() like many other ImGUI pointers.

For the record, the snippet I was using to run the demo window is: julia --project=. -e 'include(\"examples/Renderer.jl\"); include(\"examples/demo_window.jl\"); Renderer.render(() -> begin; p = Ref(false); ShowDemoWindow(p); end)'

heyx3 commented 1 year ago

If there is a reference somewhere for the breaking changes that were made, I can update these demos?

EDIT: Found the main thread: https://github.com/Gnimuc/CImGui.jl/discussions/52

Once I can get my own renderer backend working again, I'll take a whack at these demos.