single bg color

This commit is contained in:
Михаил Капелько committed 2026-10-23 15:27:28 +03:00
1 parent e0f54dde75
commit 56d4b2dd88
4 files changed
+6 -42

No files matched your search

+1 -3
View File
@@ -1,12 +1,10 @@
import QuartzCore
import UIKit
// Render a single frame. The timer calls this directly: an EGL/ANGLE surface
// presents into the view's layer, so there is no draw(_:) / needsDisplay pass
// like in the NSOpenGLView on macOS.
func renderDraw(_ vm: RenderVM) {
let t = CACurrentMediaTime() - vm.startTime
raybri_render(t)
raybri_render()
}
// Backing-pixel size of the view, which is what EGL/ANGLE renders into.
-3
View File
@@ -1,5 +1,4 @@
import Foundation
import QuartzCore
import UIKit
// Bring up EGL/ANGLE on the view's layer. Returns false when the surface could
@@ -17,8 +16,6 @@ func renderInit(_ vm: RenderVM) -> Bool {
// Same shape as the macOS timer: a repeating timer on the main run loop, but
// here it calls the renderer directly instead of flagging the view for redraw.
func renderStartTimer(_ vm: RenderVM) {
vm.startTime = CACurrentMediaTime()
let timer = Timer(timeInterval: 1.0 / RENDER_FPS, repeats: true) { [weak vm] _ in
guard let vm else { return }
renderDraw(vm)