-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging different forks : Discussion #1
Comments
Just had some time to continue this.
|
I've added some more examples, updated others. This is starting to look good. :) I've been able to test in linux_64, iOS-simulator, and extensively for osx. I'll check Rpi later. |
Rpi compatibility checked ! Last stuff to do :
|
hey Daan, I just found a very little "Bug", not important, but dunno if it
can affect other things, but just in case:
when using the VS2017 extension to add addons, I get an error when
compiling the added ofxImGui...
This do not happens when using the official Project Generator (and in
official ofxImGui I think)
[image: ImGui_addonVS2017.PNG]
…On Wed, Feb 10, 2021 at 6:27 AM Daan de Lange ***@***.***> wrote:
Rpi compatibility checked !
Last stuff to do :
- Update all examples for Rpi (on the way).
- Test / Fix imgui window restore behaviour together with imgui.ini
usage. See #3 (comment)
<#3 (comment)>
and this problematic code
<https://github.com/Daandelange/ofxImGui/blob/678284196895b28b29face9ab9d1f68444ea30ac/src/ImHelpers.cpp#L95-L97>
.
- Update/add some examples with @moebiussurfing
<https://github.com/moebiussurfing>'s code samples.
- Improve the autodraw feature to always draw after ofApp::Draw()
rather than on gui.end(). See #2 (comment)
<#2 (comment)>
- Update readme.md with relevant information (compatibility). Split
dev info to developpers.md ? Add Changelog.md ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQCGJPUF4WCU7V7HW2HKC3S6JGPVANCNFSM4ULCFWOQ>
.
|
Hey, Yes, some project flags need to be set so the addon compiles correctly, I guess the vs extension doesn't parse For now, some flags are set here : in |
the openframeworks vs extension can add (more) ofxAddons to an "empty"
project.
addons.make can be empty before use the extension.
and addons.make is written/update after this.
it's the same that the old Xcode addon to add ofxAddons on macOS...
So, it looks the VS extension is not reading the addon_config.mk... as you
said
…On Mon, Feb 22, 2021 at 6:08 AM Daan de Lange ***@***.***> wrote:
Hey, Yes, some project flags need to be set so the addon compiles
correctly, I guess the vs extension doesn't parse addons.mk (?). (I
cannot see your image)
Good point to clarify/improve/document this.
For now, some flags are set here : in addon_config.mk
<https://github.com/Daandelange/ofxImGui/blob/jvcleave/addon_config.mk>
The imgui backend flags could probably be checked and defaulted in
imconfig.h.
For the Vulkan file exclusion, adding some preprocessor conditions so that
it doesn't fail when being included.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQCGJIIEWZXZ3LG2RWPRWDTAINHBANCNFSM4ULCFWOQ>
.
|
Various improvements from various branches. See the jvcleave branch.
Everything should still be backwards-compatible with older versions of ofxImGui.
From existing forks
Note: all above points are almost included in this commit, which I used as a starting point for the merge. It's close to current jvcleave/ofxImGui, with the above changes, keeping whitespaces from jvcleave. Imgui versions are both 1.77_WIP aka the docking release.
New Stuff
example-multiwindow
(as a WIP)example-demo
: Stripped to demo only.example-simple
: a minimal ofxImGui setup.example-imguizmo
: example with an ofxImGui plugin.- 2018/06/08 (1.62) - examples: the imgui_impl_xxx files have been split to separate platform (Win32, Glfw, SDL2, etc.) from renderer (DX11, OpenGL, Vulkan, etc.).
ImGui::CreateContext()
)OFXIMGUI_ENABLE_OF_BINDINGS
to revert to legacy implementation.OFXIMGUI_MULTIWINDOW_IMPL
See notes below.gui.end()
, but not in shared mode. (Note : this is a slightly breaking change, only affecting the rare projects using autodraw, and which enable the new shared mode, and which draw graphics over the GUI : the gui would switch to be rendered above all graphics)Multi-Window/Viewport/Context notes
There's a lot of confusion around multiple viewports, windows and contexts, and most of this is still work in progress. It's useful to read the ImGui Glossary for precise definitions of various terms.
There's a lot of different ways to setup ImGui, and there are different ways to run oF (platform/window manager/number of windows, etc.) As long as there's 1 single oF window, this is quite obvious, and the new chaining methods make this even more flexible. But multiple oF windows makes it more complex. Should the GUI be available in all windows ? If so, should they make one huge UI across multiple windows, or should they each behave independently ? In terms of writing oF applications, the most common scenario would be to have an renderer output window and one or multiple GUI windows, so then you just run ofxImGui in one of them. But that doesn't cover all scenarios.
Some notes/findings/thoughts on this :
This is no real multi context. With chaining enabled, ofxImGui is setup to seamlessly create one context per window, the first caller setting up the ImGui instance.
ofxImGui Muti-window support
The current multi-window implementation is a (working) draft because this has to be finished and tested.
In my opinion, it's better to wait for ImGui releasing multi-viewport support in combination with directions from this comment to share GLFW window context.
At the moment, it works with GLFW windows, only when they have the same size. (otherwise there are mouse coordinate problems). Not recommended to use.
Wrapper / Engine / Backend notes
This update changes how the GLFW wrapper is interfaced with oF.
BaseEngine
andEngineGLFW
have less importance. However, the engine wrapper logic is close to oF, so I kept bits of it instead of removing it like other implementations. Also it will facilitate implementing the font features.These backends also use their own glfw event listeners, so I have commented the ofListeners. As ImGui is getting complex, using the backend way looks the most future-proof, while getting the most out of imgui. I've left most of the previous code, it's probably broken, but it can be enabled with
OFXIMGUI_ENABLE_OF_BINDINGS
.This changes ofxImGui behaviour a lot, because previously used functions (
programmableDrawData()
,createDeviceObjects()
, etc.) are now handled by the new imgui backends, without any oF related calls.To reflect these changes, there's also new methods :
BaseEngine::NewFrame/EndFrame
so that they better reflect the Imgui API. Also,Gui::render()
(internal) is now separated fromGui::draw()
so rendering is more flexible (handle autoDraw and chaining...). AndBaseEngine::draw()
has been renamed torender()
and simply renders without looking at the config.The Gui class orchestrates binding with OF and imgui rendering. Depending the
setup()
configuration, it calls the correctBaseEngine*
calls when needed.Depreciation note :
io.RenderDrawListsFn is depreciated since 1.60 and will be removed in ±2.0
Notes on oF + GLFW
The current ImGui backend is not seamlessly compatible with oF's libGLFW. oF0.11.0 uses a pre-3.3 version, which misses a function used by imGui.
download_libs.sh
)3300
to3400
on the line definingGLFW_HAS_MONITOR_WORK_AREA
to disable the missing feature and more.Note: GLWF 3.4.0 will bring lots of imgui interface improvements (more mouse cursors, better viewports handling, etc.).
I'll update this 1st post as things advance.
The text was updated successfully, but these errors were encountered: