app
-
class Application
The main application class.
Think of this like an aggregate of
Systems, You register aSystemwith this, then it’ll tick every “application frame”.To make your own applications:
Make a subclass of
Application,.Do the required initialization work for your own application in its constructor.
Construct systems derived from
lt::app::System.Register them to be ticked via
register_system.Eventually, unregister every system via
unregister_system, when wishing to exit the app.The
gmae_loopshould terminate once all systems are unregistered
Note
No
mainfunction is provided, you must implement your own, and at the end callgame_loopto start your application/game.Subclassed by lt::Mirror
-
class ISystem
The base, pure-virtual class for creating systems.
Subclassed by lt::MirrorSystem, lt::input::System, lt::renderer::System, lt::surface::System
-
struct TickInfo
Information required to tick a system.
Note
May be used across an entire application-frame (consisting of multiple systems ticking)
Public Types
-
using Timepoint_T = std::chrono::time_point<std::chrono::steady_clock>
Timepoint type.
Public Members
-
Duration_T delta_time = {}
Duration since previous tick’s end_time to current tick’s start_time.
-
Duration_T budget = {}
Maximum duration the system is expected to finish ticking in.
if
end_time - start_time > budget-> the system exceeded its ticking budget.else
end_time - start_time < budget-> the system ticked properly.
In other words,
end_timeis expected to be less thanstart_time + budget.Note
end_timecomes from TickResult
-
Timepoint_T start_time
Exact time when ticking started.
-
using Timepoint_T = std::chrono::time_point<std::chrono::steady_clock>
-
struct TickResult
Information about how a system’s tick performed.
Public Types
-
using Timepoint_T = std::chrono::time_point<std::chrono::steady_clock>
Timepoint type.
Public Members
-
Duration_T duration = {}
Equivalent to
end_time - info.start_time.
-
Timepoint_T end_time
Exact timepoint when ticking ended.
-
using Timepoint_T = std::chrono::time_point<std::chrono::steady_clock>