Buffer.Typed Class
Namespace: Stride.GraphicsAssembly: Stride.Graphics.dll
Typed buffer helper methods.
public static class Typed
Remarks
Example in HLSL: Buffer<float4>.
| Name | Description | |
|---|---|---|
| Methods | ||
| New(GraphicsDevice, DataPointer, PixelFormat, Boolean, GraphicsResourceUsage) | Creates a new Typed buffer Default uasge. |
|
| New(GraphicsDevice, Int32, PixelFormat, Boolean, GraphicsResourceUsage) | Creates a new Typed buffer Default uasge. |
|
| New<T>(GraphicsDevice, T[], PixelFormat, Boolean, GraphicsResourceUsage) | Creates a new Typed buffer Default uasge. |
|
Methods
New(GraphicsDevice, DataPointer, PixelFormat, Boolean, GraphicsResourceUsage)
Creates a new Typed buffer Default uasge.
public static Buffer New(GraphicsDevice device, DataPointer value, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsDevice | device | The GraphicsDevice. |
| DataPointer | value | The value to initialize the Typed buffer. |
| PixelFormat | viewFormat | The view format of the buffer. |
| System.Boolean | isUnorderedAccess | if set to |
| GraphicsResourceUsage | usage | The usage of this resource. |
Returns
| Type | Description |
|---|---|
| Buffer | A Typed buffer |
New(GraphicsDevice, Int32, PixelFormat, Boolean, GraphicsResourceUsage)
Creates a new Typed buffer Default uasge.
public static Buffer New(GraphicsDevice device, int count, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsDevice | device | The GraphicsDevice. |
| System.Int32 | count | The number of data with the following viewFormat. |
| PixelFormat | viewFormat | The view format of the buffer. |
| System.Boolean | isUnorderedAccess | if set to |
| GraphicsResourceUsage | usage | The usage. |
Returns
| Type | Description |
|---|---|
| Buffer | A Typed buffer |
New<T>(GraphicsDevice, T[], PixelFormat, Boolean, GraphicsResourceUsage)
Creates a new Typed buffer Default uasge.
public static Buffer<T> New<T>(GraphicsDevice device, T[] value, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsDevice | device | The GraphicsDevice. |
| T[] | value | The value to initialize the Typed buffer. |
| PixelFormat | viewFormat | The view format of the buffer. |
| System.Boolean | isUnorderedAccess | if set to |
| GraphicsResourceUsage | usage | The usage of this resource. |
Returns
| Type | Description |
|---|---|
| Buffer<T> | A Typed buffer |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the Typed buffer to get the sizeof from |