From 7daff572f3fb3f7c0bac88757d24e771f4386596 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Thu, 21 Apr 2022 03:57:15 -0700 Subject: [PATCH] examples: correct texture size for running on macOS ``` mach: found Metal backend on Discrete GPU adapter: Apple M1, Metal driver on macOS Version 12.1 (Build 21C52) gpu: validation error: Attachment [TextureView] size (width: 640, height: 480) does not match the size of the other attachments (width: 1280, height: 960). - While validating depthStencilAttachment. - While encoding [CommandEncoder].BeginRenderPass([RenderPassDescriptor]). ``` Signed-off-by: Stephen Gutekanst --- examples/texture-light/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/texture-light/main.zig b/examples/texture-light/main.zig index abb28c91..2cd7cc1c 100755 --- a/examples/texture-light/main.zig +++ b/examples/texture-light/main.zig @@ -50,7 +50,7 @@ pub fn main() !void { const eye = vec3(5.0, 7.0, 5.0); const target = vec3(0.0, 0.0, 0.0); - const size = try app.window.getSize(); + const size = try app.window.getFramebufferSize(); const aspect_ratio = @intToFloat(f32, size.width) / @intToFloat(f32, size.height); ctx.* = FrameParams{