move timer

This commit is contained in:
Михаил Капелько committed 2026-10-19 17:57:54 +03:00
1 parent b068b866f0
commit fab65fb5ad
6 files changed
+29 -13

No files matched your search

+9
View File
@@ -128,6 +128,7 @@ public struct F {
public static let isReadyToRender = "isReadyToRender"
public static let pixelSize = "pixelSize"
public static let reshapePixelSize = "reshapePixelSize"
public static let willPrepareGLContext = "willPrepareGLContext"
}
public struct RenderContext: DialectContext {
@@ -137,6 +138,7 @@ public struct RenderContext: DialectContext {
public var isReadyToRender = Bool()
public var pixelSize = [Int32]()
public var reshapePixelSize = [Int32]()
public var willPrepareGLContext = Bool()
public var recentField = ""
@@ -159,6 +161,9 @@ public struct RenderContext: DialectContext {
else if (name == "reshapePixelSize") {
return reshapePixelSize as! T
}
else if (name == "willPrepareGLContext") {
return willPrepareGLContext as! T
}
return "unknown-field-name" as! T
}
@@ -185,6 +190,9 @@ public struct RenderContext: DialectContext {
else if (name == "reshapePixelSize") {
reshapePixelSize = value as! [Int32]
}
else if (name == "willPrepareGLContext") {
willPrepareGLContext = value as! Bool
}
}
}
@@ -404,6 +412,7 @@ func renderRegisterEffects(_ ctrl: DialectController) {
let _: RenderContext? = registerOneliners(ctrl, [
F.isReadyToRender, { (c: RenderContext) in print("ИГР isRTR: '\(c.isReadyToRender)'") },
F.pixelSize, { (c: RenderContext) in RenderVM.shared!.pixelSize = c.pixelSize },
F.willPrepareGLContext, { (c: RenderContext) in renderStartTimer(RenderVM.shared!) },
])
}