From 606d9bb9baf4dbcb6097bc15f65e7e20ad462075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Tue, 26 Nov 2024 20:16:46 +0100 Subject: [PATCH] raylib: add missing fields to Mesh struct (#175) Add missing veoId and vboId fields to the Mesh struct. This fixes some crashes when meshes are being manipulated on the Zig side, for example when genMesh* functions are used. --- lib/preludes/raylib-prelude.zig | 2 ++ lib/raylib.zig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/preludes/raylib-prelude.zig b/lib/preludes/raylib-prelude.zig index 37b3291..8418035 100644 --- a/lib/preludes/raylib-prelude.zig +++ b/lib/preludes/raylib-prelude.zig @@ -1381,6 +1381,8 @@ pub const Mesh = extern struct { boneWeights: [*c]f32, boneMatrices: [*c]Matrix, boneCount: c_int, + vaoId: c_int, + vboId: [*c]c_int, /// Draw a 3d mesh with material and transform pub fn draw(self: Mesh, material: Material, transform: Matrix) void { diff --git a/lib/raylib.zig b/lib/raylib.zig index d383479..5aa43d6 100644 --- a/lib/raylib.zig +++ b/lib/raylib.zig @@ -1381,6 +1381,8 @@ pub const Mesh = extern struct { boneWeights: [*c]f32, boneMatrices: [*c]Matrix, boneCount: c_int, + vaoId: c_int, + vboId: [*c]c_int, /// Draw a 3d mesh with material and transform pub fn draw(self: Mesh, material: Material, transform: Matrix) void {