Class MTLBuffer
Represents a metal buffer object.
Inherited Members
Namespace: Evergine.Metal
Assembly: Evergine.Metal.dll
Syntax
public class MTLBuffer : Buffer
Constructors
MTLBuffer(MTLGraphicsContext, nint, ref BufferDescription)
Initializes a new instance of the MTLBuffer class.
Declaration
public MTLBuffer(MTLGraphicsContext context, nint data, ref BufferDescription description)
Parameters
| Type | Name | Description |
|---|---|---|
| MTLGraphicsContext | context | The graphics context. |
| nint | data | The data pointer. |
| BufferDescription | description | The buffer description. |
Properties
Name
Gets or sets a string identifying this instance. It can be used in graphics debugging tools.
Declaration
public override string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
NativePointer
Gets the native pointer.
Declaration
public override nint NativePointer { get; }
Property Value
| Type | Description |
|---|---|
| nint |
Overrides
Methods
CopyTo(IMTLBlitCommandEncoder, Buffer, uint, uint, uint)
Copies this buffer to the destination buffer.
Declaration
public void CopyTo(IMTLBlitCommandEncoder commandBuffer, Buffer destination, uint sizeInBytes, uint sourceOffset = 0, uint destinationOffset = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| IMTLBlitCommandEncoder | commandBuffer | The blit command encoder. |
| Buffer | destination | The destination buffer. |
| uint | sizeInBytes | The data size in bytes to copy. |
| uint | sourceOffset | The source buffer offset in bytes. |
| uint | destinationOffset | The destination buffer offset in bytes. |
Destroy()
Destroy graphics native resources.
Declaration
protected override void Destroy()
Overrides
SetData(nint, uint, uint)
Fills the buffer from a pointer.
Declaration
public void SetData(nint source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | source | The data pointer. |
| uint | sourceSizeInBytes | The size in bytes. |
| uint | destinationOffsetInBytes | The offset in bytes. |