This commit is contained in:
Михаил Капелько committed 2026-10-28 17:29:20 +03:00
1 parent d613f3ace1
commit ac649266ac
1 file changed
+3 -2
+3 -2
View File
@@ -19,8 +19,9 @@ func renderStartTimer(_ vm: RenderVM) {
// Make a time mark for calculating time delta
vm.startTime = CACurrentMediaTime()
// Unlike macOS, UIKit never calls draw(_:) on the view, so the timer
// renders each frame itself.
// The frame is presented by eglSwapBuffers into the view's layer, not by
// CoreGraphics, so the timer drives the rendering itself instead of
// invalidating the view for a draw(_:) pass the way macOS does.
let timer = Timer(timeInterval: 1.0 / RENDER_FPS, repeats: true) { [weak vm] _ in
guard let vm else { return }
renderDraw(vm)