Class Buffer.Index
Index buffer helper methods.
public static class Buffer.Index
- Inheritance
-
objectBuffer.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
deviceGraphicsDeviceThe GraphicsDevice.
valueDataPointerThe value to initialize the index buffer.
usageGraphicsResourceUsageThe 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
deviceGraphicsDeviceThe GraphicsDevice.
valuebyte[]The value to initialize the index buffer.
is32BitIndexboolSet to true if the buffer is using a 32 bit index or false for 16 bit index.
usageGraphicsResourceUsageThe 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
deviceGraphicsDeviceThe GraphicsDevice.
sizeintThe size in bytes.
usageGraphicsResourceUsageThe 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
deviceGraphicsDeviceThe GraphicsDevice.
valueReadOnlySpan<byte>The value to initialize the index buffer.
usageGraphicsResourceUsageThe 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
deviceGraphicsDeviceThe GraphicsDevice.
usageGraphicsResourceUsageThe usage.
Returns
- Buffer<T>
A index buffer
Type Parameters
TType 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
deviceGraphicsDeviceThe GraphicsDevice.
valueTThe value to initialize the index buffer.
usageGraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A index buffer
Type Parameters
TType 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
deviceGraphicsDeviceThe GraphicsDevice.
valueT[]The value to initialize the index buffer.
usageGraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A index buffer
Type Parameters
TType of the index buffer to get the sizeof from