diff --git a/examples/advanced-gen-texture-light/main.zig b/examples/advanced-gen-texture-light/main.zig index 29a9e0e2..a43a5076 100755 --- a/examples/advanced-gen-texture-light/main.zig +++ b/examples/advanced-gen-texture-light/main.zig @@ -33,7 +33,9 @@ const Dir = struct { }; pub fn init(app: *App, engine: *mach.Engine) !void { - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); const eye = vec3(5.0, 7.0, 5.0); const target = vec3(0.0, 0.0, 0.0); diff --git a/examples/fractal-cube/main.zig b/examples/fractal-cube/main.zig index ffe857bd..bef9e1d9 100755 --- a/examples/fractal-cube/main.zig +++ b/examples/fractal-cube/main.zig @@ -41,7 +41,9 @@ bgl: gpu.BindGroupLayout, pub fn init(app: *App, engine: *mach.Engine) !void { timer = try mach.Timer.start(); - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); const vs_module = engine.device.createShaderModule(&.{ .label = "my vertex shader", diff --git a/examples/gkurve/main.zig b/examples/gkurve/main.zig index 68036470..4e2fbd94 100644 --- a/examples/gkurve/main.zig +++ b/examples/gkurve/main.zig @@ -13,8 +13,6 @@ const Atlas = @import("atlas.zig").Atlas; const ft = @import("freetype"); const Label = @import("text.zig"); -pub const options = mach.Options{ .width = 640, .height = 480 }; - pub const App = @This(); const AtlasRGB8 = Atlas(zigimg.color.Rgba32); @@ -33,7 +31,11 @@ bind_group: gpu.BindGroup, texture_atlas_data: AtlasRGB8, pub fn init(app: *App, engine: *mach.Engine) !void { - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .width = 640, + .height = 480, + .size_min = .{ .width = 20, .height = 20 }, + }); const queue = engine.device.getQueue(); diff --git a/examples/instanced-cube/main.zig b/examples/instanced-cube/main.zig index 5bbc729e..26fe3db0 100755 --- a/examples/instanced-cube/main.zig +++ b/examples/instanced-cube/main.zig @@ -23,7 +23,9 @@ const App = @This(); pub fn init(app: *App, engine: *mach.Engine) !void { timer = try mach.Timer.start(); - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); const vs_module = engine.device.createShaderModule(&.{ .label = "my vertex shader", diff --git a/examples/rotating-cube/main.zig b/examples/rotating-cube/main.zig index 8b40ec27..b0b467a8 100755 --- a/examples/rotating-cube/main.zig +++ b/examples/rotating-cube/main.zig @@ -23,7 +23,9 @@ bind_group: gpu.BindGroup, pub fn init(app: *App, engine: *mach.Engine) !void { timer = try mach.Timer.start(); - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); const vs_module = engine.device.createShaderModule(&.{ .label = "my vertex shader", diff --git a/examples/textured-cube/main.zig b/examples/textured-cube/main.zig index 2d14d2f2..19c782fc 100644 --- a/examples/textured-cube/main.zig +++ b/examples/textured-cube/main.zig @@ -26,7 +26,9 @@ const App = @This(); pub fn init(app: *App, engine: *mach.Engine) !void { timer = try mach.Timer.start(); - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); const vs_module = engine.device.createShaderModule(&.{ .label = "my vertex shader", diff --git a/examples/two-cubes/main.zig b/examples/two-cubes/main.zig index 6bb46764..18f4a34d 100755 --- a/examples/two-cubes/main.zig +++ b/examples/two-cubes/main.zig @@ -24,7 +24,9 @@ const App = @This(); pub fn init(app: *App, engine: *mach.Engine) !void { timer = try mach.Timer.start(); - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); const vs_module = engine.device.createShaderModule(&.{ .label = "my vertex shader", diff --git a/shaderexp/main.zig b/shaderexp/main.zig index 149e2a93..717527b9 100755 --- a/shaderexp/main.zig +++ b/shaderexp/main.zig @@ -42,7 +42,9 @@ pub fn init(app: *App, engine: *mach.Engine) !void { // On linux if we don't set a minimum size, you can squish the window to 0 pixels of width and height, // this makes some strange effects when that happens, so it's better to leave a minimum size to avoid that, // this doesn't prevent you from minimizing the window. - try engine.setSizeLimits(.{ .width = 20, .height = 20 }, .{ .width = null, .height = null }); + try engine.setOptions(.{ + .size_min = .{ .width = 20, .height = 20 }, + }); var fragment_file: std.fs.File = undefined; var last_mtime: i128 = undefined;