Skip to content
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

Imgui viewports #16

Open
Pastor111 opened this issue Jul 27, 2021 · 10 comments
Open

Imgui viewports #16

Pastor111 opened this issue Jul 27, 2021 · 10 comments

Comments

@Pastor111
Copy link

Does anybody know how to get the imgui viewports working with openTK 4 or 3.3

@NogginBops
Copy link
Owner

This is something I've been thinking of adding to the sample, it would complicate the sample quite a lot but might be worth spending time doing.
It should be possible, but the opening multiple windows part might become quite janky as glfw handles that part in quite a weird way which isn't ideal.

@Pastor111
Copy link
Author

Hi, thanks for the fast reply. I myself have tried to do this task but with not much success. As you mentioned this was because of the windowing system in OpenTK, since when you open another window all the previous windows pause until you focuse them again but then it causes some strange behaviours

@Pastor111
Copy link
Author

But i think it would be good to give it another shoot

@NogginBops
Copy link
Owner

NogginBops commented Jul 27, 2021

Hi, thanks for the fast reply. I myself have tried to do this task but with not much success. As you mentioned this was because of the windowing system in OpenTK, since when you open another window all the previous windows pause until you focuse them again but then it causes some strange behaviours

This is likely because you are not handling the redrawing of the other windows. I don't know the details of how you are opening multiple windows, but one thing is that you will not really be able to use the GameWindow.Run loop to update all of the windows. And atm OpenTK might not be properly setup to handle incoming events properly as the event callbacks likely only go to the most recently created window.

All of these are issues that can be worked around, but many of these issues should probably be handled more properly in OpenTK directly.

@Pastor111
Copy link
Author

Yeah that would be the best thing, but can you still try?

@NogginBops
Copy link
Owner

I can give implementing this a shot, not sure when I'll have time to do this though.

@Pastor111
Copy link
Author

Ok, thank you, i will stay updated

@LuisMerinoP
Copy link

LuisMerinoP commented Apr 14, 2022

what would be the way to achieve this? what would make more sense for me is to be worked on the imgui.net package itself. If not, what I would think of is re-doing the imgui c# bindings from scratch along with the glfw and opengl backends from the c++ updated imgui library with CppSharp or similar, but seems quite an epic feature.
When thinking of giving this a shot may I ask if this approach makes sense and if not, roughly which one could @NogginBops?
Thanks a lot in advanced

@NogginBops
Copy link
Owner

Including the backends in the bindings could make sense and has potential to be a lot easier than redoing the backends in c#.
I've started a viewports branch here where I have a starting off point for implementing a c# backend for this
https://github.com/NogginBops/ImGui.NET_OpenTK_Sample/tree/viewports

@Pastor111
Copy link
Author

Thank you very much, I will try this when I get home however I will need to make it support OpenTK 3.3. But I don't think it would be difficult

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants