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
factoryResourceFactoryThe ResourceFactory used to compile the translated shader code.
computeShaderDescriptionShaderDescriptionThe compute shader's description.
Returns
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
factoryResourceFactoryThe ResourceFactory used to compile the translated shader code.
computeShaderDescriptionShaderDescriptionThe compute shader's description.
optionsCrossCompileOptionsThe CrossCompileOptions which will control the parameters used to translate the shaders from SPIR-V to the target language.
Returns
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
factoryResourceFactoryThe ResourceFactory used to compile the translated shader code.
vertexShaderDescriptionShaderDescriptionThe vertex shader's description.
fragmentShaderDescriptionShaderDescriptionThe 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
factoryResourceFactoryThe ResourceFactory used to compile the translated shader code.
vertexShaderDescriptionShaderDescriptionThe vertex shader's description.
fragmentShaderDescriptionShaderDescriptionThe fragment shader's description.
optionsCrossCompileOptionsThe 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).