This commit is contained in:
Samuliak 2024-07-02 09:42:23 +02:00
parent 74c0df8b71
commit c6704f9218
2 changed files with 41 additions and 9 deletions

View file

@ -36,4 +36,13 @@ class RendererMTL final : public Renderer {
// Pipelines
MTL::RenderPipelineState* displayPipeline;
MTL::RenderPipelineState* drawPipeline;
// Active state
MTL::CommandBuffer* commandBuffer = nullptr;
void createCommandBufferIfNeeded() {
if (!commandBuffer) {
commandBuffer = commandQueue->commandBuffer();
}
}
};