Closed moebiussurfing closed 3 years ago
Hey, thanks for testing. :)
In example-advanced, fx.cpp file is a highly compressed (<1kb) source code, but there's too much errors for the compression to be the source of the problem.
In the original drawlist_party code, it was a .inl
file. I think the VS project compiles it alone, as a .cpp file. Can you try with the commit above ?
example-dockingandviewports : Indeed, I'm having the same issue now on osx too. If at least 1 window is docked, it works, otherwise, not... No idea what the issue is.
Edit: And it only happens when ImGuiConfigFlags_DockingEnable
is set. Also, it looks something doesn't restore correctly for the oF context, the highlighted zone is not drawn behind the text with ofDrawBitmapStringHighlight()
.
Edit2: About imgui.ini
, that's normal behaviour as the new default option is _restoreGuiState=false
. This could be reversed to true for better backwards compatibility. I made it false
because I consider it to be an advanced feature, that was on by default in the previous implementation (and in imgui).
Related to #1
example-advanced: fixed with the new commit. working.
imgui.ini
layout auto recall on startup works as you said.
( gui.setup(nullptr, true, false, true, true);
)
cool! now I switch to this fork. thanks again.
I'll report as soon as I check more than one instance at the same time. Tell me if you want to check another thing.
Yay, thanks !
gui.setup(nullptr, true, ImGuiConfigFlags_None, true, true);
would be more appropriate for .ini
setting.
Also keep in mind that the rpi implementation (GL ES) and Vulkan are probably broken, if you need to support these.
Does example-multiwindows still crash sometimes ? What about docking and viewports ?
I'm also hesitating to change the autoDraw parameter to always draw after ofApp.draw()
(instead of the original way @ gui.end()
). That would bring more clarity in the oxImGui API : gui.start(); /* exclusively GUI composition code ... */ gui.end();
and an optional gui.render();
if one wishes to manually control the rendering order. And it would not break the original API that much. What do you think ?
Does example-multiwindows still crash sometimes ?
Not much, it's working fine now. (Not sure why crashed yesterday).
What about docking and viewports ?
It works very well.
When trying to enable the restore-layout ini settings I made this:
gui.setup(nullptr, false, ImGuiConfigFlags_DockingEnable | ImGuiConfigFlags_ViewportsEnable, true, true);
But to allow working well I had to change the flag:
ImGuiCond_Once -> ImGuiCond_FirstUseEver
That's the expected behavior. So its working perfect. The out-of-OF-app window panels are reopening correctly as well.
void drawWindow(const char* _title, int _x=300, int _y=300, ImGuiWindowFlags _flags=ImGuiWindowFlags_None ){
ImGui::SetNextWindowSize(ImVec2(200,200), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowPos(ImVec2(_x+ofGetWindowPositionX(),_y+ofGetWindowPositionY()), ImGuiCond_FirstUseEver);
hesitating to change the autoDraw parameter to always draw after
ofApp.draw()
I agree, should be always in front...
hey @Daandelange, awesome work! thanks.
I just tested/compiled ALL the amazing bundled examples on Windows10 / Visual Studio 2017.
I used the Project Generator like usual, x64 and release.
I report here the problems I have seen on the examples with errors or unexpected behavior:
The non mentioned examples are working fine.
(I do not try to solve anything yet, or reading/understanding all the ofApp comments, just compiled for now.)
Main bug in all examples: The layout is not reloaded when reopening the app. It seems that it's stored fine on imgui.ini file on exit the app.
example-advanced
do not compiles. Errors:
example-dockingandviewports it works. BUT: dock zone overlays sometimes disappear. dragging out of the app window works fine.
example-multiwindow Bug verified when the two windows differ size. Working better when sizes similar as expected. 10% of the time crashes when closing one window. It seems no matter which window is closed first...