Wait for command buffer completion before returning from renderFrame()

This commit is contained in:
Cameron Gutman 2024-02-11 00:15:32 -06:00
parent 8959ddbeb6
commit 896456a8ac

View file

@ -523,6 +523,9 @@ public:
[commandBuffer presentDrawable:m_NextDrawable];
[commandBuffer commit];
// Wait for the command buffer to complete and free our CVMetalTextureCache references
[commandBuffer waitUntilCompleted];
[m_NextDrawable release];
m_NextDrawable = nullptr;
}}