-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
AlwaysAutoResize window not resized on first call. #1893
Comments
That's intentional, we need to compute the contents size on the first frame so the window can have a size on the next frame. What's the issue with it? |
It's not a huge deal, but it is showing up as an error on a vulkan based render test case. |
If there is an error in the Vulkan example could you clarify what/where the error is? I can't seem to reproduce any error even when taking this early return path in
|
Sorry, I don't mean in the Vulkan example in imgui. I'm referring to a vulkan project I am working on. To clarify, in this particular case, the command buffer is pre-recorded once, but submitted to vulkan's render queue each frame, rather than being re-recorded each frame. So in the case where no window size is given, the above issue occurs. Perhaps this use case, albeit a common vulkan scenario, is a little outside the scope of imgui's general design. |
I see. Dear ImGui can't give you guarantee that things will appear on the first frame unless you explicitly size them. If you want to hold on a pre-recorded command buffer (which seems a little odd) maybe you can call the imgui NewFrame/Render set twice before turning the ImDrawData structure into a command buffer? |
sure, thanks for the help. |
master branch
Nothing is drawn the first time this is called, unless ImGui::SetNextWindowSize(...) is called prior to Begin().
Cheers.
The text was updated successfully, but these errors were encountered: