add(continous): example which provides a fixed render schedule
The other examples did rendering based on events, which this renderer does not. This makes these applications potentially not that efficient, but allows for consistent frame times that make animations, etc. possible. This example serves to show that you can use `zterm` for both types of render scheduling and even change between them without much efford.
This commit is contained in:
@@ -5,6 +5,7 @@ pub fn build(b: *std.Build) void {
|
||||
const Examples = enum {
|
||||
all,
|
||||
demo,
|
||||
continous,
|
||||
// elements:
|
||||
alignment,
|
||||
button,
|
||||
@@ -54,6 +55,7 @@ pub fn build(b: *std.Build) void {
|
||||
.name = e.name,
|
||||
.root_source_file = b.path(switch (@as(Examples, @enumFromInt(e.value))) {
|
||||
.demo => "examples/demo.zig",
|
||||
.continous => "examples/continous.zig",
|
||||
// elements:
|
||||
.alignment => "examples/elements/alignment.zig",
|
||||
.button => "examples/elements/button.zig",
|
||||
|
||||
Reference in New Issue
Block a user