KDGpu::RenderPassCommandRecorderWithDynamicRenderingOptions¶
Module: Public API
Modern render pass options using dynamic rendering (recommended) More...
#include <KDGpu/render_pass_command_recorder_options.h>
Public Attributes¶
| Name | |
|---|---|
| std::vector< ColorAttachment > | colorAttachments Color render targets (can be empty for depth-only passes) |
| DepthStencilAttachment | depthStencilAttachment Depth/stencil target (optional) |
| SampleCountFlagBits | samples MSAA sample count. |
| uint32_t | viewCount Number of views for multiview rendering (2 for stereo VR) |
| uint32_t | framebufferWidth Render area width (0 = infer from first attachment) |
| uint32_t | framebufferHeight Render area height (0 = infer from first attachment) |
| uint32_t | framebufferArrayLayers Array layers (0 = infer from first attachment) |
Detailed Description¶
1 | |
Modern render pass options using dynamic rendering (recommended)
Dynamic rendering allows you to specify render targets directly when beginning a render pass, without pre-creating VkRenderPass and VkFramebuffer objects. This approach was introduced as VK_KHR_dynamic_rendering and promoted to Vulkan 1.3 core, superseding the legacy VkRenderPass/VkFramebuffer model.
Benefits of Dynamic Rendering¶
- Simpler API: No need to create RenderPass objects upfront
- More flexible: Easily change attachments between frames
- Better performance: Eliminates RenderPass compatibility checks
- Modern standard: Vulkan 1.3 core feature, replacing legacy render passes
Usage Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
Filename: kdgpu_doc_snippets.cpp
MSAA with Automatic Resolve¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Filename: kdgpu_doc_snippets.cpp
Multi-View Rendering¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Filename: kdgpu_doc_snippets.cpp
Vulkan Mapping¶
In Vulkan, this maps to vkCmdBeginRendering() from VK_KHR_dynamic_rendering (Vulkan 1.3 core).
ColorAttachment, DepthStencilAttachment, RenderPassCommandRecorder
CommandRecorder::beginRenderPass()
Public Attributes Documentation¶
variable colorAttachments¶
1 | |
Color render targets (can be empty for depth-only passes)
variable depthStencilAttachment¶
1 | |
Depth/stencil target (optional)
variable samples¶
1 | |
MSAA sample count.
variable viewCount¶
1 | |
Number of views for multiview rendering (2 for stereo VR)
variable framebufferWidth¶
1 | |
Render area width (0 = infer from first attachment)
variable framebufferHeight¶
1 | |
Render area height (0 = infer from first attachment)
variable framebufferArrayLayers¶
1 | |
Array layers (0 = infer from first attachment)
Updated on 2026-03-31 at 00:02:06 +0000