2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-07-02 19:13:43 -04:00

Improve utils for mesh generation and processing (#199)

* Add memory allocation to Raylib.Utils for memory allocation (#179)
* Add utils to Mesh for allocating and accessing mesh attributes (#179)
This commit is contained in:
Nickolas McDonald
2023-09-09 13:01:59 -04:00
committed by GitHub
parent 730e0136b5
commit c642be6148
2 changed files with 141 additions and 13 deletions

View File

@ -222,6 +222,12 @@ public static unsafe partial class Raylib
}
}
/// <summary>C++ style memory allocator</summary>
public static T* New<T>(int count) where T : unmanaged
{
return (T*)MemAlloc(count * sizeof(T));
}
/// <summary>Load file data as byte array (read)</summary>
public static byte* LoadFileData(string fileName, ref uint bytesRead)
{