examples/vulkan: add optional dynamic rendering support#9357
Open
qiyuewuyi2333 wants to merge 1 commit intoocornut:dockingfrom
Open
examples/vulkan: add optional dynamic rendering support#9357qiyuewuyi2333 wants to merge 1 commit intoocornut:dockingfrom
qiyuewuyi2333 wants to merge 1 commit intoocornut:dockingfrom
Conversation
Author
|
Actually, it's more better if the backend support handle with dynamic rendering for main window like muti-window does. |
Owner
…MIC_RENDERING) Add opt-in dynamic rendering support to all four Vulkan examples (glfw, sdl2, sdl3, win32) via a commented-out macro at the top of each main.cpp: //#define APP_USE_DYNAMIC_RENDERING
8226e97 to
e6750fc
Compare
Author
Thx for your references. I have compared my code to both patches and simplified accordingly as below:
I also applied the same changes to all four Vulkan examples (glfw, sdl2, sdl3, win32) for consistency. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: #9340
Add opt-in dynamic rendering support to all four Vulkan examples
(glfw, sdl2, sdl3, win32) via a commented-out macro at the top of
each main.cpp:
//#define APP_USE_DYNAMIC_RENDERING
When enabled:
creation and enables the VkPhysicalDeviceDynamicRenderingFeaturesKHR
feature.
vkGetDeviceProcAddr (falls back to the KHR suffixed variants for
pre-1.3 drivers).
ImGui_ImplVulkanH_CreateOrResizeWindow so the helper skips
RenderPass/Framebuffer creation.
and PipelineRenderingCreateInfo (using the actual surface format)
for both main and viewport pipelines.
with vkCmdBeginRendering/vkCmdEndRendering plus the required
image layout transitions (PRESENT_SRC_KHR <-> COLOR_ATTACHMENT_OPTIMAL).
When the macro is not defined the examples behave exactly as before.