17 lines
434 B
Swift
17 lines
434 B
Swift
import Combine
|
|
import Foundation
|
|
|
|
// iOS counterpart of the macOS RenderVM: it owns the view raylib draws into
|
|
// and the timer that drives it. The actual rendering lives in raybriIOS.mm.
|
|
final class RenderVM: ObservableObject {
|
|
static private(set) weak var shared: RenderVM?
|
|
|
|
let glView = RenderGLView(frame: .zero)
|
|
var startTime: CFTimeInterval = 0
|
|
var timer: Timer?
|
|
|
|
init() {
|
|
Self.shared = self
|
|
}
|
|
}
|