Class MTLBuffer
Represents a Metal buffer object.
Implements
Inherited Members
Namespace: Evergine.Metal
Assembly: Evergine.Metal.dll
Syntax
public class MTLBuffer : Buffer, IDisposable
  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.  | 
      
| IntPtr | data | The data pointer.  | 
      
| BufferDescription | description | A buffer description.  | 
      
Properties
Name
Gets or sets a string identifying this instance. Can be used in graphics debuggers 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 | 
|---|---|
| IntPtr | 
Overrides
Methods
CopyTo(IMTLBlitCommandEncoder, Buffer, uint, uint, uint)
Copy this buffer in 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 blitcommand 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.  | 
      
Dispose()
Dispose this instance.
Declaration
public override void Dispose()
  Overrides
SetData(IMTLBlitCommandEncoder, nint, uint, uint)
Fill the buffer from a pointer.
Declaration
public void SetData(IMTLBlitCommandEncoder commandBuffer, nint source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IMTLBlitCommandEncoder | commandBuffer | the blitcommand encoder.  | 
      
| IntPtr | source | The data pointer.  | 
      
| uint | sourceSizeInBytes | The size in bytes.  | 
      
| uint | destinationOffsetInBytes | The offset in bytes.  |