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

A buffer of graphics memory containing structured vertex data. More...

Inheritance diagram for VertexBuffer< TElement >:
GraphicsObject

Public Member Functions

 VertexBuffer (int size, BufferUsage usage)
 Creates a new VertexBuffer<TElement>.
 
void SetData (in ReadOnlySpan< TElement > data)
 Change the data inside the vertex 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 amount of vertices stored within this buffer.
 
- Properties inherited from GraphicsObject
GraphicsDevice GraphicsDevice [get]
 Gets the GraphicsDevice instance this GraphicsObject belongs to.
 

Detailed Description

A buffer of graphics memory containing structured vertex data.

Template Parameters
TElementA structure representing the data contained in each vertex.
Type Constraints
TElement :unmanaged 

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.

◆ SetData()

void SetData ( in ReadOnlySpan< TElement > data)
inline

Change the data inside the vertex buffer.

Parameters
dataA slice of memory containing new vertex data. Must be the same length as the buffer itself.

◆ VertexBuffer()

VertexBuffer ( int size,
BufferUsage usage )
inline

Creates a new VertexBuffer<TElement>.

Parameters
sizeThe amount of vertices to store within the buffer.
usageA value indicating how the buffer should be treated by the graphics platform.

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