use element-wise buffer upload in GetBufferData
parent
b8bbbe2327
commit
52f4e361ae
|
@ -90,10 +90,13 @@ namespace MoonWorks.Test
|
||||||
var lastTwoSpan = otherVerts.Slice(1, 2);
|
var lastTwoSpan = otherVerts.Slice(1, 2);
|
||||||
transferBuffer.SetData(lastTwoSpan, SetDataOptions.Overwrite);
|
transferBuffer.SetData(lastTwoSpan, SetDataOptions.Overwrite);
|
||||||
cmdbuf.BeginCopyPass();
|
cmdbuf.BeginCopyPass();
|
||||||
cmdbuf.UploadToBuffer(
|
cmdbuf.UploadToBuffer<PositionVertex>(
|
||||||
transferBuffer,
|
transferBuffer,
|
||||||
vertexBuffer,
|
vertexBuffer,
|
||||||
new BufferCopy(0, (uint) (vertexSize * (vertices.Length - 2)), (uint) (vertexSize * 2)));
|
0,
|
||||||
|
(uint)(vertices.Length - 2),
|
||||||
|
2
|
||||||
|
);
|
||||||
cmdbuf.EndCopyPass();
|
cmdbuf.EndCopyPass();
|
||||||
fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf);
|
fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf);
|
||||||
GraphicsDevice.WaitForFences(fence);
|
GraphicsDevice.WaitForFences(fence);
|
||||||
|
|
Loading…
Reference in New Issue