From d1a24ce89cd308fd2ab34a4600e3d63e50ec4e60 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 4 Apr 2022 13:10:46 -0700 Subject: [PATCH] opengl: for an array, size is just the size of the type --- src/opengl/Buffer.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opengl/Buffer.zig b/src/opengl/Buffer.zig index 1104dcf9a..3797bbb03 100644 --- a/src/opengl/Buffer.zig +++ b/src/opengl/Buffer.zig @@ -73,8 +73,8 @@ pub const Binding = struct { ptr: *const anyopaque, } { return switch (@typeInfo(@TypeOf(data))) { - .Array => |ary| .{ - .size = @sizeOf(ary.child) * ary.len, + .Array => .{ + .size = @sizeOf(@TypeOf(data)), .ptr = &data, }, .Pointer => |ptr| switch (ptr.size) {