forked from MoonsideGames/MoonWorks
add element-wise SetBufferData overload
parent
c4d2e3b8ee
commit
40d9cdd33a
|
@ -765,6 +765,22 @@ namespace MoonWorks.Graphics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetBufferData<T>(
|
||||||
|
Buffer buffer,
|
||||||
|
IntPtr dataPtr,
|
||||||
|
uint bufferOffsetInElements,
|
||||||
|
uint numElements
|
||||||
|
) {
|
||||||
|
Refresh.Refresh_SetBufferData(
|
||||||
|
Device.Handle,
|
||||||
|
Handle,
|
||||||
|
buffer.Handle,
|
||||||
|
(uint) Marshal.SizeOf<T>() * bufferOffsetInElements,
|
||||||
|
dataPtr,
|
||||||
|
(uint) Marshal.SizeOf<T>() * numElements
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Asynchronously copies data into a texture.
|
/// Asynchronously copies data into a texture.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue