Table of Contents

Class IndexBuffer

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll
public class IndexBuffer : GraphicsResource, IDisposable
Inheritance
IndexBuffer
Implements
Derived
Inherited Members

Constructors

IndexBuffer(GraphicsDevice, IndexElementSize, int, BufferUsage)

public IndexBuffer(GraphicsDevice graphicsDevice, IndexElementSize indexElementSize, int indexCount, BufferUsage bufferUsage)

Parameters

graphicsDevice GraphicsDevice
indexElementSize IndexElementSize
indexCount int
bufferUsage BufferUsage

IndexBuffer(GraphicsDevice, IndexElementSize, int, BufferUsage, bool)

protected IndexBuffer(GraphicsDevice graphicsDevice, IndexElementSize indexElementSize, int indexCount, BufferUsage usage, bool dynamic)

Parameters

graphicsDevice GraphicsDevice
indexElementSize IndexElementSize
indexCount int
usage BufferUsage
dynamic bool

IndexBuffer(GraphicsDevice, Type, int, BufferUsage)

public IndexBuffer(GraphicsDevice graphicsDevice, Type indexType, int indexCount, BufferUsage usage)

Parameters

graphicsDevice GraphicsDevice
indexType Type
indexCount int
usage BufferUsage

IndexBuffer(GraphicsDevice, Type, int, BufferUsage, bool)

protected IndexBuffer(GraphicsDevice graphicsDevice, Type indexType, int indexCount, BufferUsage usage, bool dynamic)

Parameters

graphicsDevice GraphicsDevice
indexType Type
indexCount int
usage BufferUsage
dynamic bool

Properties

BufferUsage

public BufferUsage BufferUsage { get; }

Property Value

BufferUsage

IndexCount

public int IndexCount { get; }

Property Value

int

IndexElementSize

public IndexElementSize IndexElementSize { get; }

Property Value

IndexElementSize

Methods

Dispose(bool)

The method that derived classes should override to implement disposing of managed and native resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if managed objects should be disposed.

Remarks

Native resources should always be released regardless of the value of the disposing parameter.

GetData<T>(int, T[], int, int)

public void GetData<T>(int offsetInBytes, T[] data, int startIndex, int elementCount) where T : struct

Parameters

offsetInBytes int
data T[]
startIndex int
elementCount int

Type Parameters

T

GetData<T>(T[])

public void GetData<T>(T[] data) where T : struct

Parameters

data T[]

Type Parameters

T

GetData<T>(T[], int, int)

public void GetData<T>(T[] data, int startIndex, int elementCount) where T : struct

Parameters

data T[]
startIndex int
elementCount int

Type Parameters

T

GraphicsDeviceResetting()

The GraphicsDevice is resetting, so GPU resources must be recreated.

protected override void GraphicsDeviceResetting()

SetDataInternal<T>(int, T[], int, int, SetDataOptions)

protected void SetDataInternal<T>(int offsetInBytes, T[] data, int startIndex, int elementCount, SetDataOptions options) where T : struct

Parameters

offsetInBytes int
data T[]
startIndex int
elementCount int
options SetDataOptions

Type Parameters

T

SetData<T>(int, T[], int, int)

public void SetData<T>(int offsetInBytes, T[] data, int startIndex, int elementCount) where T : struct

Parameters

offsetInBytes int
data T[]
startIndex int
elementCount int

Type Parameters

T

SetData<T>(T[])

public void SetData<T>(T[] data) where T : struct

Parameters

data T[]

Type Parameters

T

SetData<T>(T[], int, int)

public void SetData<T>(T[] data, int startIndex, int elementCount) where T : struct

Parameters

data T[]
startIndex int
elementCount int

Type Parameters

T