diff --git a/Raylib-cs/Rlgl.cs b/Raylib-cs/Rlgl.cs
index 1c7157c..1a1273f 100644
--- a/Raylib-cs/Rlgl.cs
+++ b/Raylib-cs/Rlgl.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using System.Numerics;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
@@ -95,10 +96,28 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlScalef(float x, float y, float z);
- /// Multiply the current matrix by another matrix
+ ///
+ /// Multiply the current matrix by another matrix
+ ///
+ /// Current Matrix can be set via
+ ///
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlMultMatrixf(float* matf);
+ public static void rlMultMatrixf(ref Matrix4x4 matf)
+ {
+ var pinned = new GCHandle();
+ try
+ {
+ pinned = GCHandle.Alloc(matf, GCHandleType.Pinned);
+ rlMultMatrixf((float*)pinned.AddrOfPinnedObject());
+ }
+ finally
+ {
+ pinned.Free();
+ }
+ }
+
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);