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, IntPtr, ref BufferDescription)
Initializes a new instance of the MTLBuffer class.
Declaration
public MTLBuffer(MTLGraphicsContext context, IntPtr 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 IntPtr NativePointer { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Overrides
Methods
CopyTo(MTLBlitCommandEncoder, Buffer, uint, uint, uint)
Copy this buffer in the destination buffer.
Declaration
public void CopyTo(MTLBlitCommandEncoder commandBuffer, Buffer destination, uint sizeInBytes, uint sourceOffset = 0, uint destinationOffset = 0)
Parameters
Type | Name | Description |
---|---|---|
MTLBlitCommandEncoder | 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(MTLBlitCommandEncoder, IntPtr, uint, uint)
Fill the buffer from a pointer.
Declaration
public void SetData(MTLBlitCommandEncoder commandBuffer, IntPtr source, uint sourceSizeInBytes, uint destinationOffsetInBytes = 0)
Parameters
Type | Name | Description |
---|---|---|
MTLBlitCommandEncoder | commandBuffer | the blitcommand encoder. |
IntPtr | source | The data pointer. |
uint | sourceSizeInBytes | The size in bytes. |
uint | destinationOffsetInBytes | The offset in bytes. |