Ritchie's Abstractions 0.2
Platform abstractions that make Toolbox work
Loading...
Searching...
No Matches
IndexBuffer< TElement > Class Template Referencesealed

A graphics buffer containing vertex indices. More...

Inheritance diagram for IndexBuffer< TElement >:
GraphicsObject

Public Member Functions

 IndexBuffer (int size, BufferUsage usage)
 Creates a new index buffer.
 
void SetData (in ReadOnlySpan< TElement > data)
 Upload new data to this buffer.
 
- Public Member Functions inherited from GraphicsObject
void Dispose ()
 

Protected Member Functions

override void Dispose (bool disposing)
 Called when it's time to throw out the trash.
Parameters
disposingIf true, please throw away your trash. Skunks!

 
- Protected Member Functions inherited from GraphicsObject
 GraphicsObject ()
 Creates a new GraphicsObject instance.
 

Properties

int Count [get]
 Gets the number of vertex indices stored within this buffer.
 
- Properties inherited from GraphicsObject
GraphicsDevice GraphicsDevice [get]
 Gets the GraphicsDevice instance this GraphicsObject belongs to.
 

Detailed Description

A graphics buffer containing vertex indices.

Template Parameters
TElementThe data type of each vertex index. Must be a number type.
Type Constraints
TElement :unmanaged 
TElement :INumber<TElement> 

Member Function Documentation

◆ Dispose()

override void Dispose ( bool disposing)
inlineprotectedvirtual

Called when it's time to throw out the trash.

Parameters
disposingIf true, please throw away your trash. Skunks!

Reimplemented from GraphicsObject.

◆ IndexBuffer()

IndexBuffer ( int size,
BufferUsage usage )
inline

Creates a new index buffer.

Parameters
sizeA value indicating how many elements will be stored inside the buffer.
usageA BufferUsage value indicating how the graphics API should treat this buffer.

◆ SetData()

void SetData ( in ReadOnlySpan< TElement > data)
inline

Upload new data to this buffer.

Parameters
dataA span of memory containing data to upload. The span's length must be the same as this buffer's Count.

The documentation for this class was generated from the following file: