add pointer overload for Buffer.SetData

main
cosmonaut 2021-01-16 13:55:42 -08:00
parent 0edf8e5230
commit cde30b290a
1 changed files with 15 additions and 0 deletions

View File

@ -38,6 +38,21 @@ namespace Campari
}
}
public unsafe void SetData<T>(
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>(
T[] data,