metal depth stencil state or something

This commit is contained in:
Greg Wells
2025-07-01 12:42:03 -04:00
parent dd84b3bef3
commit 4c7fe77db3
4 changed files with 29 additions and 9 deletions

View File

@@ -33,6 +33,7 @@ void endMetalRenderPass(gnCommandBuffer buffer) {
void bindMetalGraphicsPipeline(gnCommandBuffer buffer, struct gnGraphicsPipeline_t* graphicsPipeline) {
id<MTLRenderCommandEncoder> encoder = (id<MTLRenderCommandEncoder>)buffer->commandBuffer->encoder;
[encoder setRenderPipelineState:graphicsPipeline->graphicsPipeline->graphicsPipeline];
[encoder setDepthStencilState:graphicsPipeline->graphicsPipeline->depthState];
if (graphicsPipeline->info.cullMode.face == GN_CULL_FACE_BACK)
[encoder setCullMode:MTLCullModeBack];