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:
committed by
GitHub
parent
730e0136b5
commit
c642be6148
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user