Table of Contents

Class Buffer.Vertex

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

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.

[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 Vertex buffer.

usage GraphicsResourceUsage

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

The GraphicsDevice.

size int

The size in bytes.

usage GraphicsResourceUsage

The usage.

bindFlags BufferFlags

The bind flags, can be combined with StreamOutput to use the buffer as a stream output target.

Returns

Buffer

A Vertex buffer

New(GraphicsDevice, Span<byte>, GraphicsResourceUsage)

Creates a new Vertex buffer with Immutable uasge by default.

public static Buffer New(GraphicsDevice device, Span<byte> value, GraphicsResourceUsage usage = GraphicsResourceUsage.Immutable)

Parameters

device GraphicsDevice

The GraphicsDevice.

value Span<byte>

The value to initialize the Vertex buffer.

usage GraphicsResourceUsage

The usage of this resource.

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 GraphicsDevice

The GraphicsDevice.

usage GraphicsResourceUsage

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

The GraphicsDevice.

vertexBufferCount int

Number of vertex in this buffer with the sizeof(T).

usage GraphicsResourceUsage

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

The GraphicsDevice.

value T

The value to initialize the Vertex buffer.

usage GraphicsResourceUsage

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

The GraphicsDevice.

value T[]

The value to initialize the Vertex buffer.

usage GraphicsResourceUsage

The usage of this resource.

Returns

Buffer<T>

A Vertex buffer

Type Parameters

T

Type of the Vertex buffer to get the sizeof from