mid smth
This commit is contained in:
1 parent
7a0a09c2a1
commit
0af2d75754
18 files changed
+509
-37
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import Combine
|
||||
import Foundation
|
||||
|
||||
// On iOS the renderer is the prebuilt raylib framework's own full-screen
|
||||
// window (see components/render/ios/renderIOS.mm: ios_ready/ios_update/
|
||||
// ios_destroy). The macOS render component is not used there, but the
|
||||
// generated dialect.swift still refers to RenderComponent/RenderVM and to the
|
||||
// renderInit/renderStartTimer/renderLoadCubeModel/renderDeinit oneliners, so
|
||||
// we provide inert counterparts to keep the dialect compiling.
|
||||
//
|
||||
// The real work happens in renderIOS.mm, which talks to the very same
|
||||
// raybri_* bridge functions these stubs would call on macOS.
|
||||
|
||||
final class RenderVM: ObservableObject {
|
||||
var didPrepareGL = false
|
||||
var pixelSize = [Int32]()
|
||||
var startTime: CFTimeInterval = 0
|
||||
|
||||
static private(set) weak var shared: RenderVM?
|
||||
|
||||
init() {
|
||||
Self.shared = self
|
||||
}
|
||||
}
|
||||
|
||||
class RenderComponent {
|
||||
let ctrl = DialectController(RenderContext())
|
||||
static private(set) weak var singleton: RenderComponent?
|
||||
|
||||
init() {
|
||||
Self.singleton = self
|
||||
renderRegisterShoulds(ctrl)
|
||||
}
|
||||
|
||||
func setup() {
|
||||
renderSet(F.didSetup, true)
|
||||
}
|
||||
}
|
||||
|
||||
func renderInit(_ vm: RenderVM) {}
|
||||
|
||||
func renderStartTimer(_ vm: RenderVM) {}
|
||||
|
||||
func renderLoadCubeModel(_ vm: RenderVM) {}
|
||||
|
||||
func renderDeinit(_ vm: RenderVM) {}
|
||||
Reference in new issue
Block a user