Table of Contents

Class VertexBufferBindingExtensions

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Provides extension methods that facilitate the conversion of Vertex Declarations and Vertex Buffer bindings into InputElementDescription structures, which are used to define the input layout for Shaders in the graphics pipeline.

public static class VertexBufferBindingExtensions
Inheritance
object
VertexBufferBindingExtensions

Methods

CreateInputElements(VertexBufferBinding[])

Creates descriptions for the Input Elements in the Vertex Buffers that will be bound to the Graphics Pipeline and fed to a Shader based on the specified Vertex Declaration.

public static InputElementDescription[] CreateInputElements(this VertexBufferBinding[] vertexBuffers)

Parameters

vertexBuffers VertexBufferBinding[]

The descriptions of the Vertex Buffers that will be bound to the pipeline.

Returns

InputElementDescription[]

An array of InputElementDescription structures representing the Input Elements derived from the Vertex Buffer bindings.

Remarks

This method processes the vertex elements in the provided VertexBufferBindings and maps them to corresponding InputElementDescription structures.

CreateInputElements(VertexDeclaration)

Creates descriptions for the Input Elements in a Vertex Buffer that will be fed to a Shader based on the specified Vertex Declaration.

public static InputElementDescription[] CreateInputElements(this VertexDeclaration vertexDeclaration)

Parameters

vertexDeclaration VertexDeclaration

The Vertex Declaration containing the Vertex Elements to be converted into Input Element descriptions.

Returns

InputElementDescription[]

An array of InputElementDescription structures representing the Input Elements derived from the Vertex Declaration.

Remarks

This method processes the vertex elements in the provided VertexDeclaration and maps them to corresponding InputElementDescription structures.