Table of Contents

Class Buffer.Index

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

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 GraphicsDevice

The GraphicsDevice.

value DataPointer

The value to initialize the index buffer.

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

value byte[]

The value to initialize the index buffer.

is32BitIndex bool

Set to true if the buffer is using a 32 bit index or false for 16 bit index.

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

size int

The size in bytes.

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

value ReadOnlySpan<byte>

The value to initialize the index buffer.

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

value T

The value to initialize the index buffer.

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

value T[]

The value to initialize the index buffer.

usage GraphicsResourceUsage

The usage of this resource.

Returns

Buffer<T>

A index buffer

Type Parameters

T

Type of the index buffer to get the sizeof from