Class Buffer.Vertex
Vertex buffer helper methods.
public static class Buffer.Vertex
- Inheritance
-
Buffer.Vertex
Methods
New(GraphicsDevice, DataPointer, GraphicsResourceUsage)
Creates a new Vertex buffer with Immutable uasge by default.
public static Buffer New(GraphicsDevice device, DataPointer value, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
DataPointerThe value to initialize the Vertex buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer
A Vertex buffer
New(GraphicsDevice, int, GraphicsResourceUsage, BufferFlags)
Creates a new Vertex buffer with Default uasge by default.
public static Buffer New(GraphicsDevice device, int size, GraphicsResourceUsage usage = GraphicsResourceUsage.Default, BufferFlags bindFlags = BufferFlags.VertexBuffer)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
size
intThe size in bytes.
usage
GraphicsResourceUsageThe usage.
bindFlags
BufferFlagsThe bind flags, can be combined with StreamOutput to use the buffer as a stream output target.
Returns
- Buffer
A Vertex buffer
New<T>(GraphicsDevice, GraphicsResourceUsage)
Creates a new Vertex buffer with Default uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
usage
GraphicsResourceUsageThe usage.
Returns
- Buffer<T>
A Vertex buffer
Type Parameters
T
Type of the Vertex buffer to get the sizeof from
New<T>(GraphicsDevice, int, GraphicsResourceUsage)
Creates a new Vertex buffer with Default usage by default.
public static Buffer<T> New<T>(GraphicsDevice device, int vertexBufferCount, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
vertexBufferCount
intNumber of vertex in this buffer with the sizeof(T).
usage
GraphicsResourceUsageThe usage.
Returns
- Buffer<T>
A Vertex buffer
Type Parameters
T
Type of the Vertex buffer to get the sizeof from
New<T>(GraphicsDevice, ref T, GraphicsResourceUsage)
Creates a new Vertex 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
GraphicsDeviceThe GraphicsDevice.
value
TThe value to initialize the Vertex buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A Vertex buffer
Type Parameters
T
Type of the Vertex buffer to get the sizeof from
New<T>(GraphicsDevice, T[], GraphicsResourceUsage)
Creates a new Vertex 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
GraphicsDeviceThe GraphicsDevice.
value
T[]The value to initialize the Vertex buffer.
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A Vertex buffer
Type Parameters
T
Type of the Vertex buffer to get the sizeof from