From 502a583e076cf1595a12def81206be7f804002e5 Mon Sep 17 00:00:00 2001
From: JupiterRider <60042618+JupiterRider@users.noreply.github.com>
Date: Tue, 21 May 2024 20:06:11 +0200
Subject: [PATCH] UnloadMesh needs a value, not a pointer (#243)
---
Raylib-cs/interop/Raylib.cs | 2 +-
Raylib-cs/types/Raylib.Utils.cs | 9 ---------
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/Raylib-cs/interop/Raylib.cs b/Raylib-cs/interop/Raylib.cs
index cebd3a8..662ee7d 100644
--- a/Raylib-cs/interop/Raylib.cs
+++ b/Raylib-cs/interop/Raylib.cs
@@ -2350,7 +2350,7 @@ public static unsafe partial class Raylib
/// Unload mesh from memory (RAM and/or VRAM)
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void UnloadMesh(Mesh* mesh);
+ public static extern void UnloadMesh(Mesh mesh);
/// Draw a 3d mesh with material and transform
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs
index 46ba915..1b83b66 100644
--- a/Raylib-cs/types/Raylib.Utils.cs
+++ b/Raylib-cs/types/Raylib.Utils.cs
@@ -911,15 +911,6 @@ public static unsafe partial class Raylib
}
}
- /// Unload mesh from memory (RAM and/or VRAM)
- public static void UnloadMesh(ref Mesh mesh)
- {
- fixed (Mesh* p = &mesh)
- {
- UnloadMesh(p);
- }
- }
-
/// Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
public static void SetMaterialTexture(ref Material material, MaterialMapIndex mapType, Texture2D texture)
{