From 0e14764ab21dc644bcfd1a3dca48688af4e3a6aa Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 20 Aug 2022 12:02:58 -0700 Subject: [PATCH] examples: make advanced-gen-texture-light compatible with self-hosted compiler Signed-off-by: Stephen Gutekanst --- examples/advanced-gen-texture-light/main.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/advanced-gen-texture-light/main.zig b/examples/advanced-gen-texture-light/main.zig index 7a36b0bd..5d723b04 100755 --- a/examples/advanced-gen-texture-light/main.zig +++ b/examples/advanced-gen-texture-light/main.zig @@ -194,7 +194,7 @@ const Camera = struct { bind_group: *gpu.BindGroup, buffer: Buffer, - const Uniform = struct { + const Uniform = extern struct { pos: Vec, mat: Mat, }; @@ -214,7 +214,7 @@ const Camera = struct { const view = self.buildViewProjMatrix(); - const uniform = .{ + const uniform = Uniform{ .pos = self.eye, .mat = view, }; @@ -678,14 +678,14 @@ const Light = struct { bind_group: *gpu.BindGroup, pipeline: *gpu.RenderPipeline, - const Uniform = struct { + const Uniform = extern struct { position: Vec, color: Vec, }; fn init(core: *mach.Core) Self { const device = core.device; - const uniform = .{ + const uniform = Uniform{ .color = vec3u(1, 1, 1), .position = vec3u(3, 7, 2), };