CompileShader

Trait CompileShader 

Source
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§

Source

type Options

Options provided to the compiler.

Source

type Context

Additional context returned by the compiler after compilation.

Required Methods§

Source

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.

Implementations on Foreign Types§

Source§

impl<O, T> CompileShader<T> for Box<O>
where O: CompileShader<T> + ?Sized, T: OutputTarget,

Implementors§