examples: workaround change in @embedFile not working with relative paths
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
37c3045314
commit
bc5e2fe9bf
8 changed files with 17 additions and 7 deletions
|
|
@ -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"));
|
||||
const 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));
|
||||
|
|
|
|||
1
examples/image-blur/assets
Submodule
1
examples/image-blur/assets
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit b5a8404715e6cfc57e66c4a7cc0625e64b3b3c56
|
||||
|
|
@ -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"));
|
||||
const 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) };
|
||||
|
|
|
|||
1
examples/textured-cube/assets
Submodule
1
examples/textured-cube/assets
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit b5a8404715e6cfc57e66c4a7cc0625e64b3b3c56
|
||||
|
|
@ -105,7 +105,7 @@ pub fn init(app: *App, core: *mach.Core) !void {
|
|||
.min_filter = .linear,
|
||||
});
|
||||
const queue = core.device.getQueue();
|
||||
var 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) };
|
||||
const cube_texture = core.device.createTexture(&.{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue