Total mess. The instructions significantly fall apart at this point and I'll have to go reverse engineer the working version from the course's git repo.

This commit is contained in:
Zed A. Shaw 2026-02-06 11:55:32 -05:00
parent 7ae6a63295
commit b3cdf37045
8 changed files with 185 additions and 196 deletions

View file

@ -202,3 +202,15 @@ void PipelineBuilder::disable_depthtest()
_depthStencil.minDepthBounds = 0.0f;
_depthStencil.maxDepthBounds = 1.0f;
}
void PipelineBuilder::enable_depthtest(bool depthWriteEnable, VkCompareOp op) {
_depthStencil.depthTestEnable = VK_TRUE;
_depthStencil.depthWriteEnable = depthWriteEnable;
_depthStencil.depthCompareOp = op;
_depthStencil.depthBoundsTestEnable = VK_FALSE;
_depthStencil.stencilTestEnable = VK_FALSE;
_depthStencil.front = {};
_depthStencil.back = {};
_depthStencil.minDepthBounds = 0.0f;
_depthStencil.maxDepthBounds = 1.0f;
}