support stencil attachments

This commit is contained in:
Samuliak 2024-07-03 15:01:37 +02:00
parent 720882efeb
commit b220c163e3
2 changed files with 24 additions and 18 deletions

View file

@ -71,7 +71,7 @@ class RendererMTL final : public Renderer {
}
}
void beginRenderPassIfNeeded(MTL::RenderPassDescriptor* renderPassDescriptor, MTL::Texture* colorTexture, MTL::Texture* depthTexture) {
void beginRenderPassIfNeeded(MTL::RenderPassDescriptor* renderPassDescriptor, MTL::Texture* colorTexture, MTL::Texture* depthTexture = nullptr) {
createCommandBufferIfNeeded();
if (!renderCommandEncoder || colorTexture != lastColorTexture || depthTexture != lastDepthTexture) {