diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-10-10 15:15:12 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-10-10 15:15:12 -0400 |
| commit | 41fd38a7d7300f33319b36db2df917d0cc4e9000 (patch) | |
| tree | e3934ad4cd227e80bba34ae500ab7689a16f27d7 /src/window.cpp | |
| parent | f872f6b0f27401804e51e7ddbccf680aba8d535e (diff) | |
Add imgui debug menu with option to toggle debug wireframes
Diffstat (limited to 'src/window.cpp')
| -rw-r--r-- | src/window.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp index d124c21..49d0b05 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2190,6 +2190,15 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { vkCmdDrawIndexed(commandBuffer, binder->indexCount, binder->instanceCounter, 0, 0, 0); if (pkeSettings.isRenderingDebug) { + vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pkePipelines.pipelines.TextureWireframe); + vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pkePipelines.vkPipelineLayout_Texture, 0, 1, &pkeDebugHitbox.vkDescriptorSets[imageIndex], 0, {}); + vkCmdBindIndexBuffer(commandBuffer, pkeDebugHitbox.indexBuffer, 0, VK_INDEX_TYPE_UINT16); + + vkCmdBindVertexBuffers(commandBuffer, 0, 1, &pkeDebugHitbox.vertexBuffer, offsets); + vkCmdBindVertexBuffers(commandBuffer, 1, 1, &pkeDebugHitbox.normalsBuffer, offsets); + vkCmdBindVertexBuffers(commandBuffer, 2, 1, &pkeDebugHitbox.uvBuffer, offsets); + + vkCmdDrawIndexed(commandBuffer, 36, binder->instanceCounter, 0, 0, 0); } } } |
