summaryrefslogtreecommitdiff
path: root/src/host/root.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-16 20:31:59 -0300
committerGabriel Schneider <[email protected]>2026-11-16 20:31:59 -0300
commit82fca5c9f29124f37f6dcd08e73e6999ce44a69d (patch)
treeb3d5487659aa933d47699e5e420fa6140b0b75f3 /src/host/root.zig
parente77b01d4b5504cea08a3f88cf8502897d868a1d3 (diff)
downloadsketchbook-82fca5c9f29124f37f6dcd08e73e6999ce44a69d.tar.gz
sketchbook-82fca5c9f29124f37f6dcd08e73e6999ce44a69d.zip
Add display-paced frame timing and presentation feedback in Zig
Diffstat (limited to 'src/host/root.zig')
-rw-r--r--src/host/root.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/host/root.zig b/src/host/root.zig
index c9cdde6..158f894 100644
--- a/src/host/root.zig
+++ b/src/host/root.zig
@@ -6,6 +6,7 @@
//! --headless offscreen video, silent audio
//! --script FILE play a script instead of reading devices
//! --fresh start from default state: no snapshots or recordings
+//! --timing-marker encode frame ID and draw sample time for video analysis
//! --profile-gpu time each GPU command alone, print the times at exit
//! --console LINE run a console line once the sketch is loaded (repeatable)
//! --define NAME=VALUE substitute {NAME} in the script
@@ -45,6 +46,8 @@ pub fn main(init: std.process.Init, linked: ?abi.Sketch) !void {
options.fresh = true;
} else if (std.mem.eql(u8, arg, "--headless")) {
options.headless = true;
+ } else if (std.mem.eql(u8, arg, "--timing-marker")) {
+ options.timing_marker = true;
} else if (std.mem.eql(u8, arg, "--profile-gpu")) {
options.profile_gpu = true;
} else if (std.mem.eql(u8, arg, "--console")) {
@@ -128,6 +131,7 @@ const usage =
\\ --headless offscreen video, silent audio, no vsync
\\ --script FILE play a script instead of reading devices
\\ --fresh start from default state: no snapshots or recordings
+ \\ --timing-marker encode frame ID and draw sample time for video analysis
\\ --profile-gpu time each GPU command alone, print the times at exit
\\ --console LINE run a console line once the sketch is loaded (repeatable)
\\ --define NAME=VALUE substitute {NAME} in the script
@@ -201,4 +205,5 @@ test {
_ = @import("audio.zig");
_ = @import("Console.zig");
_ = @import("control.zig");
+ _ = @import("timing_marker.zig");
}