Click or drag to resize
Ab4d.SharpEngine logo

GpuBufferBeginWriteToBufferT Method

Writes the specified data to this buffer in the background thread. After the data is copied, the bufferDataUploadedCallback is called with this GpuBuffer as a parameter.

Namespace: Ab4d.SharpEngine.Core
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntax
C#
public void BeginWriteToBuffer<T>(
	T[] data,
	Action<GpuBuffer>? bufferDataUploadedCallback,
	CancellationToken cancellationToken = default
)
where T : struct, new()

Parameters

data  T
data to write
bufferDataUploadedCallback  ActionGpuBuffer
callback Action that called after the data is copied. This GpuBuffer is passed as a parameter.
cancellationToken  CancellationToken  (Optional)
Optional Cancellation token that can be used to cancel the operation.

Type Parameters

T
type of data
See Also