diff --git a/examples/gkurve/label.zig b/examples/gkurve/label.zig index a821b9b7..1256f359 100644 --- a/examples/gkurve/label.zig +++ b/examples/gkurve/label.zig @@ -109,7 +109,7 @@ fn write(ctx: WriterContext, bytes: []const u8) WriterError!usize { glyph_buffer[(y - 1) * glyph_width + (x - 1)]; // zig fmt: on - data.* = zigimg.color.Rgba32.initRGB(glyph_col, glyph_col, glyph_col); + data.* = zigimg.color.Rgba32.initRgb(glyph_col, glyph_col, glyph_col); } var glyph_atlas_region = try ctx.app.texture_atlas_data.reserve(ctx.label.allocator, glyph_width + 2, glyph_height + 2); ctx.app.texture_atlas_data.set(glyph_atlas_region, glyph_data); diff --git a/examples/gkurve/main.zig b/examples/gkurve/main.zig index d9d5387d..9ec08308 100644 --- a/examples/gkurve/main.zig +++ b/examples/gkurve/main.zig @@ -59,7 +59,7 @@ pub fn init(app: *App, core: *mach.Core) !void { .rows_per_image = @intCast(u32, atlas_size.height), }; - const img = try zigimg.Image.fromMemory(core.allocator, @embedFile("./assets/gotta-go-fast.png")); + var img = try zigimg.Image.fromMemory(core.allocator, @embedFile("./assets/gotta-go-fast.png")); defer img.deinit(); const atlas_img_region = try app.texture_atlas_data.reserve(core.allocator, @truncate(u32, img.width), @truncate(u32, img.height)); @@ -84,7 +84,7 @@ pub fn init(app: *App, core: *mach.Core) !void { const white_texture_uv_data = atlas_white_region.getUVData(atlas_float_size); var white_tex_data = try core.allocator.alloc(zigimg.color.Rgba32, white_tex_scale * white_tex_scale); defer core.allocator.free(white_tex_data); - std.mem.set(zigimg.color.Rgba32, white_tex_data, zigimg.color.Rgba32.initRGB(0xff, 0xff, 0xff)); + std.mem.set(zigimg.color.Rgba32, white_tex_data, zigimg.color.Rgba32.initRgb(0xff, 0xff, 0xff)); app.texture_atlas_data.set(atlas_white_region, white_tex_data); app.vertices = try std.ArrayList(draw.Vertex).initCapacity(core.allocator, 9); diff --git a/examples/image-blur/main.zig b/examples/image-blur/main.zig index bece3c33..5da282c8 100644 --- a/examples/image-blur/main.zig +++ b/examples/image-blur/main.zig @@ -83,7 +83,7 @@ pub fn init(app: *App, core: *mach.Core) !void { .min_filter = .linear, }); - const img = try zigimg.Image.fromMemory(core.allocator, @embedFile("./assets/gotta-go-fast.png")); + var img = try zigimg.Image.fromMemory(core.allocator, @embedFile("./assets/gotta-go-fast.png")); defer img.deinit(); const img_size = gpu.Extent3D{ .width = @intCast(u32, img.width), .height = @intCast(u32, img.height) };