We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91f751f commit 9e51d52Copy full SHA for 9e51d52
Sources/GateEngine/Game.swift
@@ -148,9 +148,17 @@ public final class Game {
148
let deltaTime = Float(deltaTime)
149
self.resourceManager.update(withTimePassed: deltaTime)
150
await windowManager.updateWindows(deltaTime: deltaTime)
151
- Task(priority: .high) { @MainActor in
+ self.windowManager.drawWindows()
152
+ if await self.ecs.shouldRenderAfterUpdate(
153
+ withTimePassed: Float(deltaTime)
154
+ ) {
155
self.windowManager.drawWindows()
156
completion()
157
+ } else {
158
+ #if GATEENGINE_DEBUG_RENDERING
159
+ Log.warn("Frame Dropped", "DeltaTime:", deltaTime)
160
+ #endif
161
+ completion()
162
}
163
164
0 commit comments