StudioCherno / Walnut

Walnut is a simple application framework for Vulkan and Dear ImGui apps
MIT License
1.99k stars 367 forks source link

Window not updating during resizing #71

Open learn-more opened 5 months ago

learn-more commented 5 months ago

While the window is being resized, it is not updating. This leads to artifacts on the right and bottom of the screen.

Is there interest in a PR fixing this?

andrei-lz commented 5 months ago

I believe this is a Windows issue rather than a Walnut issue as this happens to a wide variety of applications using ImGui or even Qt in my experience.

I also don't see it happen on Linux builds of the same applications

learn-more commented 5 months ago

I believe this is a Windows issue rather than a Walnut issue as this happens to a wide variety of applications using ImGui or even Qt in my experience.

I also don't see it happen on Linux builds of the same applications

This is not a Windows issue, but an issue in the default ImGui implementation. See https://github.com/ocornut/imgui/pull/6461 for more info.

andrei-lz commented 5 months ago

Oh damn, you seem to be correct, my mistake

learn-more commented 4 months ago

@TheCherno Is Walnut derived from Hazel's code or the other way around?

lknknm commented 1 week ago

@learn-more Hello, were you able to fix this? I tried updating my ImGui submodule inside Walnut to see if a newer build would help but I wasn't able to achieve it. Resizing still has this odd behaviour. If you have a PR to commit, I would be happy to give it a look to implement it on my project.

learn-more commented 1 week ago

@learn-more Hello, were you able to fix this? I tried updating my ImGui submodule inside Walnut to see if a newer build would help but I wasn't able to achieve it. Resizing still has this odd behaviour. If you have a PR to commit, I would be happy to give it a look to implement it on my project.

I fixed this locally, but since this repository does not seem active at all I assumed the project to be abandoned.

It needs both a fix in their fork of GLFW (to do with invalidating window contents), and some changes in the Dear ImGui code that I sent as a PR to Dear ImGui:

This is not a Windows issue, but an issue in the default ImGui implementation. See ocornut/imgui#6461 for more info.

If you really need this I can probably dig it up from my old machine, but that will take a while.

From memory the patch in glfw was changing this code to return 0:

https://github.com/TheCherno/glfw/blob/026a148d7dd78d597de380c4e77ca0869f0ceaab/src/win32_window.c#L1046-L1048

lknknm commented 1 week ago

@learn-more Thank you for the quick reply! So yeah, yesterday I was updating my Walnut submodule to point to the updated version of the ImGui, but I see your PR wasn't merged so the fix wouldn't work. Plus, Walnut uses Vulkan whilst I see you were using DX9, so I didn't know how to translate the knowledge. Should I just merge your PR and will it be fine even if Walnut uses Vulkan?

Also, changing the Walnut ImGui fork to my own fork of the updated ImGui repository seemed to break the custom Titlebar. Spent some hours trying to fix it with no success. I will probably try to reverse changes and apply your code on top of the original code from StudioCherno. Let's see.

Thank you once again!

Acromatic commented 15 hours ago

I fixed this locally, but since this repository does not seem active at all I assumed the project to be abandoned.

No not abandoned, a sub-project of a much larger private project... so it's not their main focus but a nice gift... plenty of us here overseeing it. Welcome aboard.

Walnut was released maybe not even a year ago now? It's not super active as most aren't very familiar yet and it has some limitations and is rather niche considering it helps junior developers but still requires some professional level coding knowledge to do much with really. ... it's always going to be different from other applications simply because it is, in almost every way.

VagueLobster commented 15 hours ago

No not abandoned, a sub-project of a much larger private project... so it's not their main focus but a nice gift... plenty of us here overseeing it. Welcome aboard.

Walnut was released maybe not even a year ago now? It's not super active as most aren't very familiar yet and it has some limitations and is rather niche considering it helps junior developers but still requires some professional level coding knowledge to do much with really. ... it's always going to be different from other applications simply because it is, in almost every way.

Correction: Walnut was initially released in 2022, and the last update on the dev branch was from July 17th 2023 👍

Acromatic commented 3 hours ago

Correction: Walnut was initially released in 2022, and the last update on the dev branch was from July 17th 2023 👍

Right on, that being said I'm pretty sure I saw Cherno around here the other day. But this is just a starter community project. If you see some changes needing made just fix it? Write enough good PR's and usually they'll make you a contributor so you're not always hanging in the air.

Cherno codes Hazel on a private repository not on GitHub though, so I doubt he is very active on this particular site very often.

EDIT: I don't mind helping people with projects if it's in my ability to help them, simply hit me up on my page or my facebook or youtube. @adamrushford and I'll give you live support or make a video pretty much 24 hours a day.. sleep isn't really my thing