Core: add .present_frame event replacing swapbuffers call

Note that on e.g. web platform, swapbuffers is not an explicit call.
We also need a signal that the frame has been submitted and finished,
and this is it.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-21 23:53:09 -07:00 committed by Stephen Gutekanst
parent 431e0dbbe1
commit 656b0202f2
9 changed files with 79 additions and 38 deletions

View file

@ -47,10 +47,6 @@ fn init(
renderer: *Renderer.Mod,
game: *Mod,
) !void {
// The Mach .core is where we set window options, etc.
// TODO(important): replace this API with something better
mach.core.setTitle("Hello, ECS!");
// Create our player entity.
const player = try core.newEntity();