diff --git a/src/Buffer.cs b/src/Buffer.cs index c1f610e..782e2a2 100644 --- a/src/Buffer.cs +++ b/src/Buffer.cs @@ -38,6 +38,21 @@ namespace Campari } } + public unsafe void SetData( + uint offsetInBytes, + T* data, + uint dataLengthInBytes + ) where T : unmanaged + { + Refresh.Refresh_SetBufferData( + Device.Handle, + Handle, + offsetInBytes, + (IntPtr) data, + dataLengthInBytes + ); + } + // NOTE: You want to wait on the device before calling this public unsafe void GetData( T[] data,