MCPcopy
hub / github.com/EngoEngine/engo / RunIteration

Function RunIteration

engo_vulkan.go:218–236  ·  view source on GitHub ↗

RunIteration runs one iteration per frame

()

Source from the content-addressed store, hash-verified

216
217// RunIteration runs one iteration per frame
218func RunIteration() {
219 Time.Tick()
220
221 // First check for new keypresses
222 if !opts.HeadlessMode {
223 Input.update()
224 glfw.PollEvents()
225 }
226
227 // Then update the world and all Systems
228 currentUpdater.Update(Time.Delta())
229
230 // Lastly, forget keypresses and swap buffers
231 if !opts.HeadlessMode {
232 // reset values to avoid catching the same "signal" twice
233 Input.Mouse.ScrollX, Input.Mouse.ScrollY = 0, 0
234 Input.Mouse.Action = Neutral
235 }
236}
237
238// RunPreparation is called automatically when calling Open. It should only be called once.
239func RunPreparation(defaultScene Scene) {

Callers 1

runLoopFunction · 0.70

Calls 4

TickMethod · 0.80
DeltaMethod · 0.80
UpdateMethod · 0.65
updateMethod · 0.45

Tested by

no test coverage detected