From 5a2f7eadb876c9eaf1adcd00aee3879b7cae8770 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 5 Apr 2023 11:32:12 -0700 Subject: [PATCH] change array param to span in Buffer.GetData --- src/Graphics/Resources/Buffer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Graphics/Resources/Buffer.cs b/src/Graphics/Resources/Buffer.cs index 63814a07..1d653b1c 100644 --- a/src/Graphics/Resources/Buffer.cs +++ b/src/Graphics/Resources/Buffer.cs @@ -61,14 +61,14 @@ namespace MoonWorks.Graphics /// Reads data out of a buffer and into an array. /// This operation is only guaranteed to read up-to-date data if GraphicsDevice.Wait is called first. /// - /// The array that data will be copied to. + /// The span that data will be copied to. /// The length of the data to read. public unsafe void GetData( - T[] data, + Span data, uint dataLengthInBytes ) where T : unmanaged { - fixed (T* ptr = &data[0]) + fixed (T* ptr = data) { Refresh.Refresh_GetBufferData( Device.Handle,