Watch
2
0
Fork
You've already forked raylib-cs
0

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
commit c642be6148
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)
{