Table of Contents

Class ResourceFactoryExtensions

Namespace
NeoVeldrid.SPIRV
Assembly
NeoVeldrid.SPIRV.dll

Contains extension methods for loading Shader modules from SPIR-V bytecode.

public static class ResourceFactoryExtensions
Inheritance
ResourceFactoryExtensions
Inherited Members

Methods

CreateFromSpirv(ResourceFactory, ShaderDescription)

Creates a compute shader from the given ShaderDescription containing SPIR-V bytecode or GLSL source code.

public static Shader CreateFromSpirv(this ResourceFactory factory, ShaderDescription computeShaderDescription)

Parameters

factory ResourceFactory

The ResourceFactory used to compile the translated shader code.

computeShaderDescription ShaderDescription

The compute shader's description.

Returns

Shader

The compiled compute Shader.

CreateFromSpirv(ResourceFactory, ShaderDescription, CrossCompileOptions)

Creates a compute shader from the given ShaderDescription containing SPIR-V bytecode or GLSL source code.

public static Shader CreateFromSpirv(this ResourceFactory factory, ShaderDescription computeShaderDescription, CrossCompileOptions options)

Parameters

factory ResourceFactory

The ResourceFactory used to compile the translated shader code.

computeShaderDescription ShaderDescription

The compute shader's description.

options CrossCompileOptions

The CrossCompileOptions which will control the parameters used to translate the shaders from SPIR-V to the target language.

Returns

Shader

The compiled compute Shader.

CreateFromSpirv(ResourceFactory, ShaderDescription, ShaderDescription)

Creates a vertex and fragment shader pair from the given ShaderDescription pair containing SPIR-V bytecode or GLSL source code.

public static Shader[] CreateFromSpirv(this ResourceFactory factory, ShaderDescription vertexShaderDescription, ShaderDescription fragmentShaderDescription)

Parameters

factory ResourceFactory

The ResourceFactory used to compile the translated shader code.

vertexShaderDescription ShaderDescription

The vertex shader's description.

fragmentShaderDescription ShaderDescription

The fragment shader's description.

Returns

Shader[]

A two-element array, containing the vertex shader (element 0) and the fragment shader (element 1).

CreateFromSpirv(ResourceFactory, ShaderDescription, ShaderDescription, CrossCompileOptions)

Creates a vertex and fragment shader pair from the given ShaderDescription pair containing SPIR-V bytecode or GLSL source code.

public static Shader[] CreateFromSpirv(this ResourceFactory factory, ShaderDescription vertexShaderDescription, ShaderDescription fragmentShaderDescription, CrossCompileOptions options)

Parameters

factory ResourceFactory

The ResourceFactory used to compile the translated shader code.

vertexShaderDescription ShaderDescription

The vertex shader's description.

fragmentShaderDescription ShaderDescription

The fragment shader's description.

options CrossCompileOptions

The CrossCompileOptions which will control the parameters used to translate the shaders from SPIR-V to the target language.

Returns

Shader[]

A two-element array, containing the vertex shader (element 0) and the fragment shader (element 1).