Class Buffer.Index
Index buffer helper methods.
public static class Buffer.Index
- Inheritance
-
Buffer.Index
Methods
New(GraphicsDevice, DataPointer, GraphicsResourceUsage)
Creates a new index buffer with Immutable uasge by default.
[Obsolete("Use span instead")]
public static Buffer New(GraphicsDevice device, DataPointer value, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
DataPointerThe value to initialize the index buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer
A index buffer
New(GraphicsDevice, byte[], bool, GraphicsResourceUsage)
Creates a new index buffer with Immutable uasge by default.
public static Buffer New(GraphicsDevice device, byte[] value, bool is32BitIndex, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
byte[]The value to initialize the index buffer.
is32BitIndex
boolSet to true if the buffer is using a 32 bit index or false for 16 bit index.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer
A index buffer
New(GraphicsDevice, int, GraphicsResourceUsage)
Creates a new index buffer with Default uasge by default.
public static Buffer New(GraphicsDevice device, int size, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
size
intThe size in bytes.
usage
GraphicsResourceUsageThe usage.
Returns
- Buffer
A index buffer
New(GraphicsDevice, ReadOnlySpan<byte>, GraphicsResourceUsage)
Creates a new index buffer with Immutable uasge by default.
public static Buffer New(GraphicsDevice device, ReadOnlySpan<byte> value, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
ReadOnlySpan<byte>The value to initialize the index buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer
A index buffer
New<T>(GraphicsDevice, GraphicsResourceUsage)
Creates a new index buffer with Default uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
usage
GraphicsResourceUsageThe usage.
Returns
- Buffer<T>
A index buffer
Type Parameters
T
Type of the index buffer to get the sizeof from
New<T>(GraphicsDevice, ref T, GraphicsResourceUsage)
Creates a new index buffer with Immutable uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, ref T value, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
TThe value to initialize the index buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A index buffer
Type Parameters
T
Type of the index buffer to get the sizeof from
New<T>(GraphicsDevice, T[], GraphicsResourceUsage)
Creates a new index buffer with Immutable uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, T[] value, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
T[]The value to initialize the index buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A index buffer
Type Parameters
T
Type of the index buffer to get the sizeof from