-
Notifications
You must be signed in to change notification settings - Fork 71
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
DiligentImplImGui add multi-viewport functionality #156
Comments
Imgui renderer is implemented here |
After a lot of thinking and tinkering, I've finally figured out a streamlined way of integrating the docking branch into DiligentEngine. I've tested it and it works! (Docking and multi-viewports). There is one small hiccup though, fixing it will allow me to create a class that you can even add to the DiligentTools repo if you like, I created a new issue discussing it here #157 |
Update: Most things seem to be in order. But I have a couple of issues. Issue 1:I get errors when creating a new window which crashes the application only sometimes. Using Vulkan I get this error repeatedly while a new window had been created.
Using Direct X 11/12 I get these errors
Not sure what's causing these errors yet, possibly incorrect use of the Diligent API on my part (I'm fairly new to rendering APIs in general). But I'm using the The errors repeatedly show only when rendering a new window and disappear otherwise. The application crashes sometimes, I can't recreate the crashing consistently. Issue 2:The ImGui viewports feature doesn't work with OpenGL since we cant create multiple swapchains. I'm assuming this is a known issue since it's mentioned in the multi-window tutorial. There might be a hacky way around it but it would require changing the way Update cont. Currently, my implementation (and any application that uses it) will heavily rely on GLFW and the respective backend files from ImGui. Implementing a backend for Diligent will require more work than is needed for my project, but if it helps others I'm willing to spend a bit more time and try and figure it out. It doesn't look particularly simple though. It needs to handle window create/delete then handle input/window events send them to ImGUI. There's a more detailed description in the ImGui Repo |
For the errors: make sure that you call GetCurrentBackBufferRTV from each swap chain every frame. Follow the multiwindow tutorial. OpenGL backend does not support multiple windows and multiple swap chains. We are not planning to add this feature and in general strongly discourage anyone to use OpenGL unless there is a very good reason to use it.
|
Thanks for the quick reply! I double checked and I am calling I agree with you, OpenGL is a last resort, I just wanted to make sure an application won't break if someone decides to use it. The ImGui docking features are still enabled, However, the viewport features are not.
yes my bad, I meant ImGui backend (eg. |
I don't know the reasons for the errors, but incorrect API usage is the most likely cause. Check Multiple Windows tutorial and ImGUI demo - they all run without errors.
There already exists Diligent implementation for imgui. |
This is more of a feature request,
I'd love to use the ImGui "docking" branch using the Diligent engine.
By simply checking out the docking branch in the imgui submodule (DiligentTools/ThirdParty/imgui) I was able to use the new docking feature.
But I can't enable the new viewports feature, presumably because the Diligent imgui implementation has no way of processing new window creation. Not even sure where I would start to look.
Might be easier in my case since I'm using GLFW for window creation.
The text was updated successfully, but these errors were encountered: