Click or drag to resize
Ab4d.SharpEngine logo

GpuBuffer Methods

The GpuBuffer type exposes the following members.

Methods
 NameDescription
Public methodCopyToBuffer CopyToBuffer copies this buffer to the destinationBuffer and waits for the copy operation to finish. When size is not defined (is zero), then size of the smaller buffer is used.
Public methodDispose() Dispose
Protected methodDispose(Boolean) Dispose
(Overrides ComponentBase.Dispose(Boolean))
Public methodGetMappedMemoryPtr() Returns an IntPtr of the mapped memory. The IntPtr can be used to get the content of the buffer or to copy new content to that location. After using the memory call UnmapMemory() method.
Public methodGetMappedMemoryPtr(Int64, Int64) Returns an IntPtr of the mapped memory with specified offset and size. The IntPtr can be used to get the content of the buffer or to copy new content to that location. After using the memory call UnmapMemory() method.
Public methodGetMappedMemorySpan<T>() Returns a Span that can be used to get the content of the buffer or copy new content to that location. After using the memory call UnmapMemory() method.
Public methodGetMappedMemorySpan<T>(Void, T) 
Public methodReadFromBuffer<T>() Returns the read T from the buffer.
Public methodReadFromBuffer<T>(Int32) Returns the read T from the buffer at the specified offset.
Public methodReadFromBuffer<T>(T[]) Reads the content of this buffer to the specified array. If the array is smaller than this buffer, then only the data with the size of the array are copied. If the buffer is smaller than the array, then the whole buffer will be copied to the start of the array.
Public methodReadFromBuffer<T>(Span) 
Public methodReadFromBuffer<T>(Span, Void) 
Public methodReadFromBuffer<T>(T[], Int32, Int32) Reads the dataItemsCount items from this buffer, starting from the bufferDataOffset (specified in absolute bytes offset not as items count). The data are read to the specified array.
Public methodToString
(Overrides Object.ToString())
Public methodUnmapMemory Unmaps the memory that was mapped by calling GetMappedMemoryPtr.
Public methodWriteToBuffer<T>(Span) 
Public methodWriteToBuffer<T>(T) Writes the specified data to this buffer.
Public methodWriteToBuffer<T>(T[]) Writes the specified data to this buffer.
Public methodWriteToBuffer<T>(T, Int32) Writes the specified data to this buffer. The data is written to the bufferDataOffset location in this buffer (specified in absolute bytes offset not as items count).
Public methodWriteToBuffer<T>(Span, Void) 
Public methodWriteToBuffer<T>(T[], Int32, Int32) Writes the dataLength items to this buffer. Writing starting at the bufferDataOffset location in this buffer (specified in absolute bytes offset not as items count).
Public methodWriteToBufferAsync<T>(T[]) 
Public methodWriteToBufferAsync<T>(T[], Action<GpuBuffer>) 
Top
See Also