pub trait CompileShader<T: OutputTarget> {
type Options;
type Context;
// Required method
fn compile(
self,
options: Self::Options,
) -> Result<ShaderCompilerOutput<T::Output, Self::Context>, ShaderCompileError>;
}
Expand description
A trait for objects that can be compiled into a shader.
Required Associated Types§
Required Methods§
Sourcefn compile(
self,
options: Self::Options,
) -> Result<ShaderCompilerOutput<T::Output, Self::Context>, ShaderCompileError>
fn compile( self, options: Self::Options, ) -> Result<ShaderCompilerOutput<T::Output, Self::Context>, ShaderCompileError>
Consume the object and return the compiled output of the shader.
The shader should either be reflected or validated as ReflectShader before being compiled, or the results may not be valid.