Skip to content

Commit

Permalink
Document why back-face culling isn't used
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-johansson committed Sep 27, 2024
1 parent 4f626b3 commit 0ccc4c1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/vulkan_renderer/lib/src/vulkan_imgui_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ auto _create_imgui_pipeline_layout(VkDevice device,
}

auto _create_imgui_graphics_pipeline(VkDevice device,
VkDescriptorSetLayout descriptor_set_layout,
VkPipelineLayout pipeline_layout,
const VkPipelineRenderingCreateInfoKHR& rendering_info)
-> std::expected<VulkanPipeline, VkResult>
Expand Down Expand Up @@ -191,7 +190,7 @@ auto _create_imgui_graphics_pipeline(VkDevice device,
.depthClampEnable = VK_FALSE,
.rasterizerDiscardEnable = VK_FALSE,
.polygonMode = VK_POLYGON_MODE_FILL,
.cullMode = VK_CULL_MODE_NONE, // FIXME
.cullMode = VK_CULL_MODE_NONE, // Dear ImGui doesn't work well with back-face culling
.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE,
.depthBiasEnable = VK_FALSE,
.depthBiasConstantFactor = 0.0f,
Expand Down Expand Up @@ -352,7 +351,6 @@ auto VulkanImGuiContext::init(IWindow& window, ImGui_ImplVulkan_InitInfo& vulkan

if (auto pipeline =
_create_imgui_graphics_pipeline(vulkan_info.Device,
context.m_descriptor_set_layout.handle,
context.m_pipeline_layout.handle,
vulkan_info.PipelineRenderingCreateInfo)) {
context.m_pipeline = std::move(*pipeline);
Expand Down

0 comments on commit 0ccc4c1

Please sign in to comment.