never mind on SetDataOptions, bad idea

pull/14/head
cosmonaut 2022-01-13 14:48:32 -08:00
parent a5c8ebfc3a
commit d2fca3654b
2 changed files with 7 additions and 13 deletions

@ -1 +1 @@
Subproject commit 07449cfef8aac872e6e89d085e4732e23314e4ab Subproject commit f92137ccc6a12d1f1a908c7b97acb7f7b75d1641

View File

@ -680,8 +680,7 @@ namespace MoonWorks.Graphics
Buffer buffer, Buffer buffer,
IntPtr dataPtr, IntPtr dataPtr,
uint bufferOffsetInBytes, uint bufferOffsetInBytes,
uint dataLengthInBytes, uint dataLengthInBytes
Refresh.SetDataOptions setDataOption = Refresh.SetDataOptions.Deferred
) { ) {
Refresh.Refresh_SetBufferData( Refresh.Refresh_SetBufferData(
Device.Handle, Device.Handle,
@ -689,8 +688,7 @@ namespace MoonWorks.Graphics
buffer.Handle, buffer.Handle,
bufferOffsetInBytes, bufferOffsetInBytes,
dataPtr, dataPtr,
dataLengthInBytes, dataLengthInBytes
setDataOption
); );
} }
@ -708,8 +706,7 @@ namespace MoonWorks.Graphics
T[] data, T[] data,
uint bufferOffsetInBytes, uint bufferOffsetInBytes,
uint startElement, uint startElement,
uint numElements, uint numElements
Refresh.SetDataOptions setDataOption = Refresh.SetDataOptions.Deferred
) where T : unmanaged ) where T : unmanaged
{ {
var elementSize = Marshal.SizeOf<T>(); var elementSize = Marshal.SizeOf<T>();
@ -724,8 +721,7 @@ namespace MoonWorks.Graphics
buffer.Handle, buffer.Handle,
bufferOffsetInBytes, bufferOffsetInBytes,
(IntPtr) dataPtr, (IntPtr) dataPtr,
(uint) (numElements * elementSize), (uint) (numElements * elementSize)
setDataOption
); );
} }
} }
@ -740,8 +736,7 @@ namespace MoonWorks.Graphics
public unsafe void SetBufferData<T>( public unsafe void SetBufferData<T>(
Buffer buffer, Buffer buffer,
T[] data, T[] data,
uint bufferOffsetInBytes = 0, uint bufferOffsetInBytes = 0
Refresh.SetDataOptions setDataOption = Refresh.SetDataOptions.Deferred
) where T : unmanaged ) where T : unmanaged
{ {
SetBufferData( SetBufferData(
@ -749,8 +744,7 @@ namespace MoonWorks.Graphics
data, data,
bufferOffsetInBytes, bufferOffsetInBytes,
0, 0,
(uint) data.Length, (uint) data.Length
setDataOption
); );
} }