|
2 | 2 | /* |
3 | 3 | * UI overlay class using ImGui |
4 | 4 | * |
5 | | -* Copyright (C) 2017-2025 by Sascha Willems - www.saschawillems.de |
| 5 | +* Copyright (C) 2017-2026 by Sascha Willems - www.saschawillems.de |
6 | 6 | * |
7 | 7 | * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) |
8 | 8 | */ |
@@ -56,7 +56,7 @@ namespace vks |
56 | 56 | } |
57 | 57 |
|
58 | 58 | /** Prepare all vulkan resources required to render the UI overlay */ |
59 | | - void UIOverlay::prepareResources() |
| 59 | + void UIOverlay::prepare() |
60 | 60 | { |
61 | 61 | assert(maxConcurrentFrames > 0); |
62 | 62 |
|
@@ -192,11 +192,7 @@ namespace vks |
192 | 192 |
|
193 | 193 | // Buffers per max. frames-in-flight |
194 | 194 | buffers.resize(maxConcurrentFrames); |
195 | | - } |
196 | 195 |
|
197 | | - /** Prepare a separate pipeline for the UI overlay rendering decoupled from the main application */ |
198 | | - void UIOverlay::preparePipeline(const VkPipelineCache pipelineCache, const VkRenderPass renderPass, const VkFormat colorFormat, const VkFormat depthFormat) |
199 | | - { |
200 | 196 | // Pipeline layout |
201 | 197 | // Push constants for UI rendering parameters |
202 | 198 | VkPushConstantRange pushConstantRange{ .stageFlags = VK_SHADER_STAGE_VERTEX_BIT, .size = sizeof(PushConstBlock) }; |
@@ -276,7 +272,7 @@ namespace vks |
276 | 272 | pipelineCreateInfo.pNext = &pipelineRenderingCreateInfo; |
277 | 273 | } |
278 | 274 | #endif |
279 | | - VK_CHECK_RESULT(vkCreateGraphicsPipelines(device->logicalDevice, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipeline)); |
| 275 | + VK_CHECK_RESULT(vkCreateGraphicsPipelines(device->logicalDevice, VK_NULL_HANDLE, 1, &pipelineCreateInfo, nullptr, &pipeline)); |
280 | 276 | } |
281 | 277 |
|
282 | 278 | /** Update vertex and index buffer containing the imGui elements when required */ |
|
0 commit comments