BufferData Class
Namespace: Stride.Graphics.DataAssembly: Stride.Graphics.dll
Content of a GPU buffer (vertex buffer, index buffer, etc...).
System.Object →
BufferData
Derived from BufferData:
[DataContract]
[ContentSerializer(typeof(DataContentSerializerWithReuse<BufferData>))]
public class BufferData
Name | Description | |
---|---|---|
Constructors | ||
BufferData() | ||
BufferData(BufferFlags, Byte[]) | ||
Properties | ||
BufferFlags | Buffer flags describing the type of buffer. |
|
Content | Gets or sets the buffer content. |
|
StructureByteStride | The size of the structure (in bytes) when it represents a structured/typed buffer. |
|
Usage | Usage of this buffer. |
|
Methods | ||
New<T>(BufferFlags, T[]) | Creates a new instance of BufferData from a typed buffer. |
Constructors
BufferData()
public BufferData()
BufferData(BufferFlags, Byte[])
public BufferData(BufferFlags bufferFlags, byte[] content)
Parameters
Type | Name | Description |
---|---|---|
BufferFlags | bufferFlags | |
System.Byte[] | content |
Properties
BufferFlags
Buffer flags describing the type of buffer.
public BufferFlags BufferFlags { get; set; }
Property Value
Type | Description |
---|---|
BufferFlags |
Content
Gets or sets the buffer content.
public byte[] Content { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | The buffer content. |
StructureByteStride
The size of the structure (in bytes) when it represents a structured/typed buffer.
public int StructureByteStride { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Usage
Usage of this buffer.
public GraphicsResourceUsage Usage { get; set; }
Property Value
Type | Description |
---|---|
GraphicsResourceUsage |
Methods
New<T>(BufferFlags, T[])
Creates a new instance of BufferData from a typed buffer.
public static BufferData New<T>(BufferFlags bufferFlags, T[] content)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
BufferFlags | bufferFlags | The flags indicating the type of buffer |
T[] | content | An array of data |
Returns
Type | Description |
---|---|
BufferData | A buffer data. |
Type Parameters
Name | Description |
---|---|
T | Type of the element to store in the buffer data. |