class RenderLoop::LoopHarness

Overview

Manages the main rendering loop

TODO put rendering and state in their own threads.

Defined in:

render_loop/loop_harness.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(frame_rate : Float64, engines : Array(RenderLoop::Engine)) #

[View source]

Instance Method Detail

def on_tick(&block) #

Executed before each tick in the main loop. This allows the graphics context to perform operations if necessary.


[View source]
def start(window : RenderLoop::Window) #

Signals the loop to begin running in the window This should be ran inside your graphics context otherwise you will receive an error This is a noop if the loop is already running.


[View source]
def stop #

Signals the loop to finish up and stop, and the graphics context to shut down.


[View source]