[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct3D11.Buffer

Class Buffer

Namespace
GrapeCity.Documents.DX.Direct3D11
Assembly
GcDocs.DX.Windows.dll

ID3D11Buffer

[Guid("48570b85-d1ee-4fcd-a250-eb350722b037")]
public class Buffer : Resource, IDisposable, IUnknown
Inheritance
object
Buffer
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Buffer(IntPtr)

Initializes a new instance of the Buffer class.

public Buffer(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Description

GetDescription

public BufferDescription Description { get; }

Property Value

BufferDescription

Methods

Create(Device, DataStream, BufferDescription)

Initializes a new instance of the Buffer class.

public static Buffer Create(Device device, DataStream data, BufferDescription description)

Parameters

device Device

The device with which to associate the buffer.

data DataStream

Initial data used to initialize the buffer.

description BufferDescription

The description of the buffer.

Returns

Buffer

Create(Device, DataStream, int, ResourceUsage, BindFlags, CpuAccessFlags, ResourceMiscFlags, int)

Initializes a new instance of the Buffer class.

public static Buffer Create(Device device, DataStream data, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)

Parameters

device Device

The device with which to associate the buffer.

data DataStream

Initial data used to initialize the buffer.

sizeInBytes int

The size, in bytes, of the buffer.

usage ResourceUsage

The usage pattern for the buffer.

bindFlags BindFlags

Flags specifying how the buffer will be bound to the pipeline.

accessFlags CpuAccessFlags

Flags specifying how the buffer will be accessible from the CPU.

miscFlags ResourceMiscFlags

Miscellaneous resource options.

structureByteStride int

The size (in bytes) of the structure element for structured buffers.

Returns

Buffer

Create(Device, BufferDescription)

Initializes a new instance of the Buffer class.

public static Buffer Create(Device device, BufferDescription description)

Parameters

device Device

The device with which to associate the buffer.

description BufferDescription

The description of the buffer.

Returns

Buffer

Create(Device, int, ResourceUsage, BindFlags, CpuAccessFlags, ResourceMiscFlags, int)

Initializes a new instance of the Buffer class.

public static Buffer Create(Device device, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)

Parameters

device Device

The device with which to associate the buffer.

sizeInBytes int

The size, in bytes, of the buffer.

usage ResourceUsage

The usage pattern for the buffer.

bindFlags BindFlags

Flags specifying how the buffer will be bound to the pipeline.

accessFlags CpuAccessFlags

Flags specifying how the buffer will be accessible from the CPU.

miscFlags ResourceMiscFlags

Miscellaneous resource options.

structureByteStride int

The size (in bytes) of the structure element for structured buffers.

Returns

Buffer

Create(Device, IntPtr, BufferDescription)

Initializes a new instance of the Buffer class.

public static Buffer Create(Device device, IntPtr dataPointer, BufferDescription description)

Parameters

device Device

The device with which to associate the buffer.

dataPointer System.IntPtr

The data pointer.

description BufferDescription

The description of the buffer.

Returns

Buffer

Create<T>(Device, T[], BufferDescription)

Creates a new instance of the Buffer class.

public static Buffer Create<T>(Device device, T[] data, BufferDescription description) where T : struct

Parameters

device Device

The device with which to associate the buffer.

data T[]

Initial data used to initialize the buffer.

description BufferDescription

The description.

Returns

Buffer

An initialized buffer

Type Parameters

T

Type of the data to upload

Create<T>(Device, ref T, BufferDescription)

Creates a new instance of the Buffer class.

public static Buffer Create<T>(Device device, ref T data, BufferDescription description) where T : struct

Parameters

device Device

The device with which to associate the buffer.

data T

Initial data used to initialize the buffer.

description BufferDescription

The description.

Returns

Buffer

An initialized buffer

Type Parameters

T

Type of the data to upload

Create<T>(Device, BindFlags, T[], int, ResourceUsage, CpuAccessFlags, ResourceMiscFlags, int)

Creates a new instance of the Buffer class.

public static Buffer Create<T>(Device device, BindFlags bindFlags, T[] data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceMiscFlags miscFlags = ResourceMiscFlags.None, int structureByteStride = 0) where T : struct

Parameters

device Device

The device with which to associate the buffer.

bindFlags BindFlags

Flags specifying how the buffer will be bound to the pipeline.

data T[]

Initial data used to initialize the buffer.

sizeInBytes int

The size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.

usage ResourceUsage

The usage pattern for the buffer.

accessFlags CpuAccessFlags

Flags specifying how the buffer will be accessible from the CPU.

miscFlags ResourceMiscFlags

Miscellaneous resource options.

structureByteStride int

The size (in bytes) of the structure element for structured buffers.

Returns

Buffer

An initialized buffer

Type Parameters

T

Type of the data to upload

Create<T>(Device, BindFlags, ref T, int, ResourceUsage, CpuAccessFlags, ResourceMiscFlags, int)

Creates a new instance of the Buffer class.

public static Buffer Create<T>(Device device, BindFlags bindFlags, ref T data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceMiscFlags miscFlags = ResourceMiscFlags.None, int structureByteStride = 0) where T : struct

Parameters

device Device

The device with which to associate the buffer.

bindFlags BindFlags

Flags specifying how the buffer will be bound to the pipeline.

data T

Initial data used to initialize the buffer.

sizeInBytes int

The size, in bytes, of the buffer. If 0 is specified, sizeof(T) is used.

usage ResourceUsage

The usage pattern for the buffer.

accessFlags CpuAccessFlags

Flags specifying how the buffer will be accessible from the CPU.

miscFlags ResourceMiscFlags

Miscellaneous resource options.

structureByteStride int

The size (in bytes) of the structure element for structured buffers.

Returns

Buffer

An initialized buffer

Type Parameters

T

Type of the data to upload

GetDescription(out BufferDescription)

void ID3D11Buffer::GetDesc([Out] D3D11_BUFFER_DESC* pDesc)

public void GetDescription(out BufferDescription descRef)

Parameters

descRef BufferDescription

Operators

explicit operator Buffer(IntPtr)

Performs an explicit conversion from System.IntPtr to Buffer.

public static explicit operator Buffer(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

Buffer