Search Results for

    Show / Hide Table of Contents

    Class WGPUBuffer

    Represents a WebGPU buffer object.

    Inheritance
    object
    GraphicsResource
    Buffer
    WGPUBuffer
    Inherited Members
    Buffer.Description
    Buffer.UpdateCounter
    GraphicsResource.Context
    GraphicsResource.Disposed
    GraphicsResource.Dispose()
    GraphicsResource.Dispose(bool)
    Namespace: Evergine.WebGPU
    Assembly: Evergine.WebGPU.dll
    Syntax
    public class WGPUBuffer : Buffer

    Constructors

    WGPUBuffer(WGPUGraphicsContext, ref BufferDescription, nint)

    Initializes a new instance of the WGPUBuffer class.

    Declaration
    public WGPUBuffer(WGPUGraphicsContext context, ref BufferDescription description, nint data = 0)
    Parameters
    Type Name Description
    WGPUGraphicsContext context

    The graphics context.

    BufferDescription description

    A buffer description.

    nint data

    The data pointer.

    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
    Buffer.Name

    NativePointer

    Gets the native pointer.

    Declaration
    public override nint NativePointer { get; }
    Property Value
    Type Description
    nint
    Overrides
    GraphicsResource.NativePointer

    Methods

    CopyTo(WGPUCommandEncoder, Buffer, uint, uint, uint)

    Copy this buffer in the destination buffer.

    Declaration
    public void CopyTo(WGPUCommandEncoder commandEncoder, Buffer destination, uint sizeInBytes, uint sourceOffset = 0, uint destinationOffset = 0)
    Parameters
    Type Name Description
    WGPUCommandEncoder commandEncoder

    The 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
    GraphicsResource.Destroy()

    SetData(nint, ulong, uint)

    Fill the buffer from a pointer.

    Declaration
    public void SetData(nint source, ulong sourceSizeInBytes, uint destinationOffsetInBytes = 0)
    Parameters
    Type Name Description
    nint source

    The data pointer.

    ulong sourceSizeInBytes

    The size in bytes.

    uint destinationOffsetInBytes

    The offset to start writing in the buffer, in bytes.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX