Fix rlMultMatrixf
- Add missing ToFloatV functions to Raymath - Fix rlMultMatrixf overload to use MatrixToFloatV
This commit is contained in:
parent
776c84bb25
commit
0b081ce721
2 changed files with 12 additions and 11 deletions
|
|
@ -104,18 +104,11 @@ namespace Raylib_cs
|
|||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void rlMultMatrixf(float* matf);
|
||||
|
||||
public static void rlMultMatrixf(ref Matrix4x4 matf)
|
||||
/// <inheritdoc cref="rlMultMatrixf"/>
|
||||
public static void rlMultMatrixf(Matrix4x4 matf)
|
||||
{
|
||||
var pinned = new GCHandle();
|
||||
try
|
||||
{
|
||||
pinned = GCHandle.Alloc(matf, GCHandleType.Pinned);
|
||||
rlMultMatrixf((float*)pinned.AddrOfPinnedObject());
|
||||
}
|
||||
finally
|
||||
{
|
||||
pinned.Free();
|
||||
}
|
||||
float16 f = Raymath.MatrixToFloatV(matf);
|
||||
rlMultMatrixf(f.v);
|
||||
}
|
||||
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue