Click or drag to resize
Ab4d.SharpEngine logo

GpuBuffer Class

GpuBuffer represents a buffer in the graphics card's memory.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Core
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public class GpuBuffer : GpuDeviceComponent, IDisposable

The GpuBuffer type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyBuffer Gets the Vulkan Buffer
Public propertyBufferMemory Gets the VulkanMemoryInfo that represents the memory location of the buffer
Public propertyBufferSize Gets the size of the buffer in bytes
Top
Methods
 NameDescription
Public methodDispose Dispose
Protected methodDispose(Boolean) Dispose
(Overrides ComponentBaseDispose(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 methodGetMappedMemorySpanT 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 methodGetMappedMemorySpanT(Void, T) 
Public methodReadFromBufferT(T) Reads the content of this buffer to the specified array.
Public methodReadFromBufferT(Span) 
Public methodUnmapMemory Unmaps the memory that was mapped by calling GetMappedMemoryPtr.
Public methodWriteToBufferT(Span) 
Public methodWriteToBufferT(T) Writes the specified data to this buffer.
Public methodWriteToBufferT(T) Writes the specified data to this buffer.
Top
Fields
 NameDescription
Public fieldIsPersistentlyMapped True if buffer is persistently mapped.
Top
See Also